コード例 #1
0
        /// <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"));
        }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
        /// <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; }
        }