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(); }
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(); * }*/ }
public static List <IWebElement> FindElements(By locator) { return(WebDriverManager.GetWebDriver().FindElements(locator).ToList()); }
public static IWebElement FindElement(By locator) { return(WebDriverManager.GetWebDriver().FindElement(locator)); }