Exemplo n.º 1
0
 // Clicks
 public static void ClickAndWaitForAjax(this IWebElement element)
 {
     Waits.WaitUntilElementPresent(drv => element);
     element.ClickJS();
     Thread.Sleep(2000);
     Waits.ForExtJsAjax();
 }
Exemplo n.º 2
0
        // Select
        public static void SelectByText(this IWebElement element, string text)
        {
            Waits.WaitUntilElementPresent(drv => element);
            var options = element.FindElements(By.TagName("option"));

            foreach (var option in options)
            {
                bool isSelected = option.GetAttribute("selected") != null && option.GetAttribute("selected").ToLower() == "true";
                bool isMatch    = option.Text.Contains(text);

                //Select the correct match and deselect all others
                if (isMatch != isSelected)
                {
                    option.Click();
                }
            }
        }
 protected WebDriverBaseAbstractPageObject()
 {
     // Wait 2 seconds for page to become stale.
     Waits.ForExtJsAjax();
     Waits.WaitForAngular();
 }
Exemplo n.º 4
0
 public static void ClickJS(this IWebElement element)
 {
     Waits.ClickJS(element);
 }