Пример #1
0
 public BDDTestSearchDefinition()
 {
     _baseSteps             = new BaseSteps();
     _homePageSteps         = new HomePageSteps();
     _searchResultPageSteps = new SearchResultPageSteps();
     _productListPageSteps  = new ProductListPageSteps();
     _productPageSteps      = new ProductPageSteps();
 }
Пример #2
0
 public TestClass()
 {
     _baseSteps             = new BaseSteps();
     _homePageSteps         = new HomePageSteps();
     _searchResultPageSteps = new SearchResultPageSteps();
     _productListPageSteps  = new ProductListPageSteps();
     _productPageSteps      = new ProductPageSteps();
 }
Пример #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");
        }
Пример #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
        }
Пример #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)));
        }
Пример #6
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"));
        }