public IWebDriver PayForOrder(IWebDriver driver) { ProductListPage productListPage = new ProductListPage(); productListPage.AddToCartLogIn(driver); Thread.Sleep(2000); driver.FindElement(By.Id("PayBtn")).Click(); Thread.Sleep(2000); return(driver); }
public void DeleteItemFromCart(IWebDriver driver) { ProductListPage productListPage = new ProductListPage(); productListPage.AddToCartLogIn(driver); int oldProdCount = driver.FindElements(By.ClassName("prod_name")).Count; driver.FindElements(By.ClassName("glyphicon-remove")).First().Click(); Thread.Sleep(2000); int newProdCount = driver.FindElements(By.ClassName("prod_name")).Count; Assert.IsTrue(newProdCount < oldProdCount); }