/// <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); } }
/// <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; } }