Ejemplo n.º 1
0
        public static void MouseOver(By locator)
        {
            /* Actions action = new Actions(IWebDriverManager.GetWebDriver());
             * IWebElement element = FindElement(locator);
             * action.ClickAndHold(element).Perform();*/

            IWebElement element = FindElement(locator);
            Actions     builder = new Actions(WebDriverManager.GetWebDriver());

            builder.MoveToElement(element).Click();
        }
Ejemplo n.º 2
0
        public static void AcceptAlert()
        {
            //Element.FindElement(By.XPath("//div[class='modal-footer']/button[text()='OK']")).Click();


            IAlert a = WebDriverManager.GetWebDriver().SwitchTo().Alert();

            a.Accept();

            /* if (a.Text. Equals("Are you sure you want delete?"))
             * {
             *   a.Accept();
             * }
             * else
             * {
             *   a.Dismiss();
             * }*/
        }
Ejemplo n.º 3
0
 public static List <IWebElement> FindElements(By locator)
 {
     return(WebDriverManager.GetWebDriver().FindElements(locator).ToList());
 }
Ejemplo n.º 4
0
 public static IWebElement FindElement(By locator)
 {
     return(WebDriverManager.GetWebDriver().FindElement(locator));
 }