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

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

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

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