public void ShouldBeAbleToFilterProductsByHighPrice() { var outPutDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); _driver = new FirefoxDriver(outPutDirectory); var InventoryPO = new InventoryPO(_driver); InventoryPO.Visit(); InventoryPO.filterByHighPrice(); Assert.AreEqual("$49.99", _driver.FindElement(By.ClassName("inventory_item_price")).Text); }
public void ShouldBeAbleToFilterProductsByNameZtoA() { var outPutDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); _driver = new FirefoxDriver(outPutDirectory); var InventoryPO = new InventoryPO(_driver); InventoryPO.Visit(); InventoryPO.filterByNameZtoA(); Assert.AreEqual("Test.allTheThings() T-Shirt (Red)", _driver.FindElement(By.ClassName("inventory_item_name")).Text); }
public void ShouldBeAbleToCompletePurchase() { var outPutDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); _driver = new FirefoxDriver(outPutDirectory); var InventoryPO = new InventoryPO(_driver); var CartPO = new CartPO(_driver); var CheckoutOnePO = new CheckoutOnePO(_driver); var CheckoutTwoPO = new CheckoutTwoPO(_driver); InventoryPO.Visit(); InventoryPO.addAllItemsToCart(); CartPO.confirmCart(); CheckoutOnePO.fillInformationForm("Andrei", "Gonçalves", "1109657"); CheckoutOnePO.submitForm(); CheckoutTwoPO.finishPurchase(); Assert.IsTrue(_driver.Url.Contains("checkout-complete.html")); }