public static void WaitUntilInvisibilityOfElementLocated(IWebElement element) { IWebDriver driver = WebDriverFactoryVS.GetDriver(); WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(120)); wait.IgnoreExceptionTypes(typeof(Exception)); wait.Until(ExpectedConditions.InvisibilityOfElementLocated(By.Id(element.GetAttribute("id")))); //wait.Until(ExpectedConditions.ElementToBeSelected(element)); }
public static void WaitUntilElementToBeClickable(IWebElement element) { IWebDriver driver = WebDriverFactoryVS.GetDriver(); WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(120)); //wait.IgnoreExceptionTypes(typeof(Exception)); wait.Until(ExpectedConditions.ElementToBeClickable(element)); //wait.Until(ExpectedConditions.ElementToBeSelected(element)); }
private static IWebDriver GetDriver(IWebElement webElement = null) { IWebDriver driver = (webElement as IWrapsDriver)?.WrappedDriver ?? WebDriverFactoryVS.GetDriver(); return(driver); }
public static void SetHighLight(this IWebElement webElement, string color = "blue") { IWebDriver driver = (webElement as IWrapsDriver)?.WrappedDriver ?? WebDriverFactoryVS.GetDriver(); SetHighLight(webElement, driver, color); }
//private Actions actions; public MenuUtils(IWebElement element) { this.element = element; this.driver = WebDriverFactoryVS.GetDriver(); }
public InitEvidenceAttribute() { //IWebDriver driver = Activator.CreateInstance(type: webDriver) as IWebDriver; Evidencia.Iniciar(WebDriverFactoryVS.GetDriver()); }