Exemplo n.º 1
0
        static public void CheckCorrectness(MainDriver driver)
        {
            WebDriverWait waits = new WebDriverWait(driver.Driver, TimeSpan.FromSeconds(10));

            waits.Until(ExpectedConditions.ElementIsVisible(By.XPath("//em[contains(text(),'There are no items in your cart.')]")));
            Assert.IsTrue(driver.Driver.FindElements(By.XPath("//em[contains(text(),'There are no items in your cart.')]")).Count > 0, "Error");
        }
Exemplo n.º 2
0
 public static MainDriver getInstance(IWebDriver driver)
 {
     if (instance == null)
     {
         instance = new MainDriver(driver);
     }
     return(instance);
 }
Exemplo n.º 3
0
 public MainPage(MainDriver driver_)
 {
     driver = driver_;
 }
Exemplo n.º 4
0
 public Checkout(MainDriver driver_)
 {
     driver = driver_;
 }
Exemplo n.º 5
0
        public void init()
        {
            IWebDriver ch_driver = new ChromeDriver();

            driver = MainDriver.getInstance(ch_driver); // Singleton
        }
Exemplo n.º 6
0
 static public void EndDriver(MainDriver driver)
 {
     driver.Driver.Quit();
 }
Exemplo n.º 7
0
 public ProductPage(MainDriver driver_)
 {
     driver = driver_;
 }