/// <summary> /// Click the "Preview" button on the Edit/Create Job Posting page /// </summary> public void ClickPreviewButton() { try { BaseWaitForPageToLoad(Driver, 100); PreviewButton.Click(); } catch (Exception e) { throw e; } }
/// <summary> /// Get the text of the Preview button. /// </summary> /// <returns>The text of the Preview button</returns> public string GetPreviewButtonText() { // wait until the button text changes after saving WebDriverWait wait = new WebDriverWait(_driver, new TimeSpan(0, 0, 5)); wait.Until(d => d.FindElement(By.Id("ViewLiveButton")).GetAttribute("value").Contains("ID")); return(PreviewButton.GetAttribute("value")); }
public bool RequisitionIsOpen() { try { var wait = new WebDriverWait(_driver, new TimeSpan(0, 0, BaseFrameWork._DefWaitTimeOutSec)); wait.Until(d => PreviewButton.GetAttribute("value").Contains("Open")); return(PreviewButton.GetAttribute("value").Contains("Open")); } catch (WebDriverTimeoutException) { return(false); } }
public static void Layout(SerializedProperty property, string newFilePreffix) { EditorGUILayout.BeginHorizontal(); bool valid = (property.objectReferenceValue != null) && (property.objectReferenceValue is T); var id = -1; if (valid) { id = PrefabCache <T> .Cache.IndexOf(property.objectReferenceValue as T); } id++; var iconSize = 20; if (id == 0 && newFilePreffix != null) { if (IconButton.Layout("add", iconSize, '+', "Create new " + typeof(T).ToString() + " prefab", Color.green)) { property.objectReferenceValue = K10EditorGUIUtils.CreateSequentialGO <T>(newFilePreffix + typeof(T)); PrefabCache <T> .Refresh(); } } else { PreviewButton.Layout(iconSize, property.objectReferenceValue as T); } var nid = EditorGUILayout.Popup(id, PrefabCache <T> .NamesWithNone); if (nid != id) { nid--; if (nid < 0) { property.objectReferenceValue = null; } else { property.objectReferenceValue = PrefabCache <T> .Cache[nid]; } } if (IconButton.Layout("refreshButton", iconSize, 'R', "Refresh prefabs loaded", Color.blue)) { PrefabCache <T> .Refresh(); } EditorGUILayout.EndHorizontal(); }
public static void Draw(Rect area, SerializedProperty property, string addFolder) { bool valid = (property.objectReferenceValue != null) && (property.objectReferenceValue is T); var id = -1; if (valid) { id = PrefabCache <T> .Cache.IndexOf(property.objectReferenceValue as T); } id++; var iconSize = Mathf.Min(area.height, area.width / 4); var iconArea = area.CutRight(area.width - iconSize).RequestHeight(iconSize); if (id == 0 && addFolder != null) { if (IconButton.Draw(iconArea, "add", '+', "Create new " + typeof(T).ToString() + " prefab", Color.green)) { property.objectReferenceValue = K10EditorGUIUtils.CreateSequentialGO <T>(addFolder + "/New" + typeof(T).ToString()); PrefabCache <T> .Refresh(); } } else { PreviewButton.Draw(iconArea, property.objectReferenceValue as T); } area = area.CutLeft(iconSize).RequestHeight(EditorGUIUtility.singleLineHeight); var nid = EditorGUI.Popup(area.CutRight(iconSize), id, PrefabCache <T> .NamesWithNone); if (nid != id) { nid--; if (nid < 0) { property.objectReferenceValue = null; } else { property.objectReferenceValue = PrefabCache <T> .Cache[nid]; } } if (IconButton.Draw(area.CutLeft(area.width - iconSize).RequestHeight(iconSize), "refreshButton", 'R', "Refresh prefabs loaded", Color.blue)) { PrefabCache <T> .Refresh(); } }
/// <summary> /// Get the text of the Preview button. /// </summary> /// <returns>The text of the Preview button</returns> public string GetPreviewButtonText() { try { BaseWaitForPageToLoad(Driver, 100); // wait until the button text changes after saving WebDriverWait wait = new WebDriverWait(Driver, new TimeSpan(0, 0, 5)); bool txt = wait.Until(d => d.FindElement(By.Id("ViewLiveButton")).GetAttribute("value").Contains("ID")); return PreviewButton.GetAttribute("value"); } catch (Exception e) { throw e; } }
/// <summary> /// Click the "Preview" button on the Edit/Create Job Posting page /// </summary> public void ClickPreviewButton() { PreviewButton.WaitAndClick(_driver); }