Example #1
0
        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");
        }
Example #2
0
        public void PageTitleTest()
        {
            _driver.Url = Url;

            var homePage = new HomePageSteps(_driver);

            homePage.Search("Телефоны");

            Assert.IsTrue(_driver.Title.Contains("Телефоны".ToUpper()));
        }
Example #3
0
        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");
        }
Example #4
0
        public void Test()
        {
            _driver.Url = Url;

            var homePage   = new HomePageSteps(_driver);
            var resultPage = new SearchResultPageSteps(_driver);

            homePage.Search("Ноутбук");

            resultPage.SelectFilterItem("Класс", "игровой");

            //need to add verification
        }
Example #5
0
        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)));
        }
Example #6
0
        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);
        }
Example #7
0
        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"));
        }
Example #8
0
 public void WhenISearchFor(string searchProduct)
 {
     _homePageSteps.Search(searchProduct);
     _searchResultPageSteps.WaitSearchPageIsDisplayed();
 }