예제 #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");
        }
예제 #2
0
 public static MainDriver getInstance(IWebDriver driver)
 {
     if (instance == null)
     {
         instance = new MainDriver(driver);
     }
     return(instance);
 }
예제 #3
0
 public MainPage(MainDriver driver_)
 {
     driver = driver_;
 }
예제 #4
0
 public Checkout(MainDriver driver_)
 {
     driver = driver_;
 }
예제 #5
0
        public void init()
        {
            IWebDriver ch_driver = new ChromeDriver();

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