public void SearchMacbookTest() { _homePageSteps.Search(searchProductMac); _searchResultPageSteps.WaitSearchPageIsDisplayed(); var resultList = _searchResultPageSteps.GetResultItemTitles; Assert.IsTrue(resultList.Length > 0, "No elements in result"); Assert.IsTrue(resultList.All(i => i.ToLower().Contains(searchProductMac)), "Not All contains product name"); }
public void PageTitleTest() { _driver.Url = Url; var homePage = new HomePageSteps(_driver); homePage.Search("Телефоны"); Assert.IsTrue(_driver.Title.Contains("Телефоны".ToUpper())); }
public void BuyLaptop() { _driver.Url = Url; var homePage = new HomePageSteps(_driver); var resultPage = new SearchResultPageSteps(_driver); homePage.Search("Ноутбук"); resultPage.BuyItem("Ноутбук HP 15-bs006ur"); Assert.AreEqual(_driver.Title, "Оформление заказа", "Incorrect page"); }
public void Test() { _driver.Url = Url; var homePage = new HomePageSteps(_driver); var resultPage = new SearchResultPageSteps(_driver); homePage.Search("Ноутбук"); resultPage.SelectFilterItem("Класс", "игровой"); //need to add verification }
public void VerifyItemsInResultTest() { _driver.Url = Url; var homePage = new HomePageSteps(_driver); var resultPage = new SearchResultPageSteps(_driver); homePage.Search("Ноутбук"); var resultList = resultPage.GetResultItemTitle(); Assert.IsTrue(resultList.All(i => i.Contains("Ноутбук") || i.Equals(string.Empty))); }
public void SearchProduct() { //arrange _driver.Url = Url; var homePage = new HomePageSteps(_driver); var searchResultsPage = new SearchResutSteps(_driver); //act homePage.Search("macbook"); var conditionList = searchResultsPage.GetResultsText().Select(t => t.ToLower().Contains("macbook")).ToList(); //assert CollectionAssert.DoesNotContain(conditionList, false); }
public void OpenItemTest() { _driver.Url = Url; var homePage = new HomePageSteps(_driver); var resultPage = new SearchResultPageSteps(_driver); var productPage = new ProductPageSteps(_driver); homePage.Search("Ноутбук"); resultPage.OpenItem("Ноутбук LENOVO ThinkPad T470p"); var productTitle = productPage.GetTitle(); Assert.IsTrue(productTitle.Contains("Ноутбук Lenovo ThinkPad T470p")); Assert.IsTrue(resultPage.GetTitle().Contains("Lenovo ThinkPad T470p")); }
public void WhenISearchFor(string searchProduct) { _homePageSteps.Search(searchProduct); _searchResultPageSteps.WaitSearchPageIsDisplayed(); }