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));
        }
Exemple #3
0
        private static IWebDriver GetDriver(IWebElement webElement = null)
        {
            IWebDriver driver = (webElement as IWrapsDriver)?.WrappedDriver ?? WebDriverFactoryVS.GetDriver();

            return(driver);
        }
Exemple #4
0
        public static void SetHighLight(this IWebElement webElement, string color = "blue")
        {
            IWebDriver driver = (webElement as IWrapsDriver)?.WrappedDriver ?? WebDriverFactoryVS.GetDriver();

            SetHighLight(webElement, driver, color);
        }
Exemple #5
0
        //private Actions actions;

        public MenuUtils(IWebElement element)
        {
            this.element = element;
            this.driver  = WebDriverFactoryVS.GetDriver();
        }
Exemple #6
0
 public InitEvidenceAttribute()
 {
     //IWebDriver driver = Activator.CreateInstance(type: webDriver) as IWebDriver;
     Evidencia.Iniciar(WebDriverFactoryVS.GetDriver());
 }