示例#1
0
        public void ClickNextButton()
        {
            IWebElement element = DriverSingletone.GetDriver().FindElement(By.XPath("//span[@class='RveJvd snByac']"));

            //element.WaitForElementToBeClickable();
            element.WaitForElementIsDisplayed();
            element.Click();
        }
示例#2
0
 public LoginPage()
 {
     PageFactory.InitElements(DriverSingletone.GetDriver(), this);
 }
示例#3
0
 public void SetUpDriver()
 {
     driver = DriverSingletone.GetDriver();
 }
示例#4
0
 public static void ClickWhitJSHelp(this IWebElement element)
 {
     new WebDriverWait(DriverSingletone.GetDriver(), TimeSpan.FromSeconds(5)).Until(
         d => ((IJavaScriptExecutor)d).ExecuteScript("return document.readyState").Equals("complete"));
     ((IJavaScriptExecutor)DriverSingletone.GetDriver()).ExecuteScript("arguments[0].click()", element);
 }
示例#5
0
 public static WebDriverWait GetWebDriverWait(int timeout)
 {
     return(new WebDriverWait(DriverSingletone.GetDriver(), TimeSpan.FromSeconds(timeout)));
 }
 public static void GoToUrl(string url)
 {
     DriverSingletone.GetDriver().Navigate().GoToUrl(url);
 }