Exemplo n.º 1
0
 public void PageWithDifferentProductLure()
 {
     ((IJavaScriptExecutor)webdriver).ExecuteScript("scroll(0,400)");
     webdriver.FindElement(_AddRodCarpProMethodInBasket).Click();
     TypeOfWait.WaitInterval(1);
     webdriver.FindElement(_ContinueShoping).Click();
 }
Exemplo n.º 2
0
 public void EntryInAccount()
 {
     webdriver.FindElement(_EnterWithPassword).Click();
     webdriver.FindElement(By.XPath("//input[@class='custom-field-error input-field phone-number']")).SendKeys("380508375753"); // можно сделать отдельные классы
     webdriver.FindElement(By.XPath("//input[@class='custom-field-error input-field password']")).SendKeys("Тщлызкун228");
     webdriver.FindElement(By.CssSelector("div button[class='btn btn-big']")).Click();
     TypeOfWait.WaitInterval(1);
 }
Exemplo n.º 3
0
 public void AddGoodsInBasket()
 {
     ((IJavaScriptExecutor)webdriver).ExecuteScript("scroll(0,600)");
     webdriver.FindElement(_BuutonAddGoodInBasket).Click();
     webdriver.FindElement(_ContinueShoping).Click();
     webdriver.FindElement(_ButtonExit).Click();
     TypeOfWait.WaitInterval(1);
     Assert.AreEqual("1", webdriver.FindElement(_NumberOfGoodsInBasket).Text);
 }
Exemplo n.º 4
0
        public static WebDriverWait Wait(this IWebDriver driver, TypeOfWait type)
        {
            TimeSpan timeSpan;

            switch (type)
            {
            case TypeOfWait.TenSeconds:
                timeSpan = TimeSpan.FromSeconds(10);
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }

            return(new WebDriverWait(driver, timeSpan));
        }
Exemplo n.º 5
0
 public static void WaitForClickable(this IWebDriver driver, By by, TypeOfWait type = TypeOfWait.TenSeconds)
 {
     driver.Wait(type).Until(x => x.FindElement(by).Displayed);
 }
Exemplo n.º 6
0
 public void CheckClicableElementTelegram()
 {
     TypeOfWait.WaitElement(webdriver, _LinkTelegram);
 }
Exemplo n.º 7
0
 public void CheckClicableElementViber()
 {
     TypeOfWait.WaitElement(webdriver, _LinkViber);
 }
Exemplo n.º 8
0
 public void CheckClicableElementEmail()
 {
     TypeOfWait.WaitElement(webdriver, _LinkEmail);
 }