Example #1
0
        public void ProductComparison_ClickingTwoTimesCompareButton_OneProductAdded(string product)
        {
            SearchPage            searchPage  = new SearchMethods().Search(product);
            ProductComparisonPage comparePage = searchPage
                                                .AddAppropriateProductToComparison(product)
                                                .OpenAppropriateProductPage(product)
                                                .ClickOnCompareProductButton()
                                                .ClickOnCompareProductsPageLink();

            Assert.AreEqual(product, comparePage.GetLastProductNameText(), "The selected product was not added to the comparison table.");
            Assert.True(comparePage.CountColumns() == 1, "One product is added to the comparison table several times.");
        }
Example #2
0
        public void ProductComparison_TwoDifferentProducts_AddedToComparisonTable
            (string Desktop, string FirstDesktop, string SecondDesktop)
        {
            SearchPage            searchPage  = new SearchMethods().Search(Desktop);
            ProductComparisonPage comparePage = searchPage
                                                .AddAppropriateProductToComparison(FirstDesktop)
                                                .AddAppropriateProductToComparison(SecondDesktop)
                                                .ClickSuccessAlertMessageLink();

            Assert.AreEqual(FirstDesktop, comparePage.GetFirstProductNameText(), "The selected product was not added to the comparison table.");
            Assert.AreEqual(SecondDesktop, comparePage.GetLastProductNameText(), "The selected product was not added to the comparison table.");
            Assert.True(comparePage.CountColumns() == 2, "All or one of products isn't added to the comparison table.");
        }