class Test_itemCount(unittest.TestCase):

    @pytest.fixture(autouse=True)
    def classSetup(self, oneTimeSetUp):
        self.hp = HomePage(self.driver)
        self.lp = LoginPage(self.driver)
        self.pdp = ProductDetailsPage(self.driver)
        self.sp = ShoppingCartPage(self.driver)
        self.cp = CartPage(self.driver)

    @pytest.mark.run(order=1)
    def test_goToPDP(self):
        self.hp.goToLogin()
        credentials = json.loads(open('loginCredential.json').read())
        username = credentials.get('username')
        password = credentials.get('password')
        # l = [i for i in credentials.values()]
        self.lp.loginAmazon(username,password)
        self.hp.goToAmazonEcho()
        self.pdp.addToCart()
        self.sp.goToCart()
        before=self.cp.getTheQuantity()
        self.driver.back()
        self.driver.back()
        self.pdp.addToCart()
        self.sp.goToCart()
        after=self.cp.getTheQuantity()
        assert before<after,"Quantity is not incremented"
コード例 #2
0
class Test_productDetails(unittest.TestCase):
    @pytest.fixture(autouse=True)
    def classSetup(self, oneTimeSetUp):
        self.hp = HomePage(self.driver)
        self.lp = LoginPage(self.driver)
        self.pdp = ProductDetailsPage(self.driver)
        self.sp = ShoppingCartPage(self.driver)
        self.cp = CartPage(self.driver)
        self.dap = DeliveryAddressPage(self.driver)
        self.sop = ShippingOptionPage(self.driver)
        self.pp = PaymentPage(self.driver)

    @pytest.mark.run(order=1)
    def test_goToPDP(self):
        self.hp.goToLogin()
        credentials = json.loads(open('loginCredential.json').read())
        username = credentials.get('username')
        password = credentials.get('password')
        self.lp.loginAmazon(username, password)
        self.hp.goToAmazonEcho()
        self.pdp.addToCart()
        self.sp.goToCart()
        self.cp.proceedToCheckout()
        self.dap.goToAdress()
        self.sop.continueCheckout()
        self.pp.paymentDetails()
コード例 #3
0
 def classSetup(self, oneTimeSetUp):
     self.hp = HomePage(self.driver)
     self.lp = LoginPage(self.driver)
     self.pdp = ProductDetailsPage(self.driver)
     self.sp = ShoppingCartPage(self.driver)
     self.cp = CartPage(self.driver)
     self.dap = DeliveryAddressPage(self.driver)
     self.sop = ShippingOptionPage(self.driver)
     self.pp = PaymentPage(self.driver)
コード例 #4
0
class Test_productDetails(unittest.TestCase):

    @pytest.fixture(autouse=True)
    def classSetup(self, oneTimeSetUp):
        self.hp = HomePage(self.driver)
        self.pdp = ProductDetailsPage(self.driver)

    @pytest.mark.run(order=1)
    def test_goToPDP(self):
        self.hp.goToAmazonEcho()
        actual=self.pdp.getAvailibilityAlexa()
        assert "In stock" in actual,"Product is not in stock"
        time.sleep(5)
        print("The total count of review: ",self.pdp.getReviewCount())
        print("The Review Summary: ")
        self.pdp.getReviews()
コード例 #5
0
class Test_productDetails(unittest.TestCase):
    @pytest.fixture(autouse=True)
    def classSetup(self, oneTimeSetUp):
        self.hp = HomePage(self.driver)
        self.pdp = ProductDetailsPage(self.driver)

    @pytest.mark.run(order=1)
    def test_goToPDP(self):
        self.hp.goToAmazonEcho()
        actual = self.pdp.getAvailibilityAlexa()
        assert "In stock" in actual, "Product is not in stock"
class Test_productDetails(unittest.TestCase):
    @pytest.fixture(autouse=True)
    def classSetup(self, oneTimeSetUp):
        self.hp = HomePage(self.driver)
        self.lp = LoginPage(self.driver)
        self.pdp = ProductDetailsPage(self.driver)
        self.sp = ShoppingCartPage(self.driver)
        self.cp = CartPage(self.driver)

    @pytest.mark.run(order=1)
    def test_goToPDP(self):
        self.hp.goToLogin()
        credentials = json.loads(open('loginCredential.json').read())
        username = credentials.get('username')
        password = credentials.get('password')
        self.lp.loginAmazon(username, password)
        self.hp.goToAmazonEcho()
        self.pdp.addToCart()
        self.sp.goToCart()
        before = self.cp.getTheTotalAmount()
        self.driver.close()
コード例 #7
0
 def classSetup(self, oneTimeSetUp):
     self.hp = HomePage(self.driver)
     self.wlp = WomenWesternWearListingPage(self.driver)
     self.wwlp = WinterWearListingPage(self.driver)
     self.pdp = ProductDetailsPage(self.driver)
 def classSetup(self, oneTimeSetUp):
     self.hp = HomePage(self.driver)
     self.lp = LoginPage(self.driver)
     self.pdp = ProductDetailsPage(self.driver)
     self.sp = ShoppingCartPage(self.driver)
     self.cp = CartPage(self.driver)
コード例 #9
0
 def classSetup(self, oneTimeSetUp):
     self.hp = HomePage(self.driver)
     self.pdp = ProductDetailsPage(self.driver)