コード例 #1
0
 def test_product_details(self,username,password,productName,Category):
     LoginLogoutPage.login_with_valid_credentials(self,username,password)
     SearchPage.search_data(self,productName,Category)
     ProductDetailsPage.get_product_details(self,productName)
     ProductDetailsPage.give_your_Opinion_page(self,'Very Good')
     ProductDetailsPage.get_product_details(self,productName)
     self.assertTrue(ProductDetailsPage.add_to_notePad_Page(self,productName))
     ProductDetailsPage.get_product_details(self,productName)
     ProductDetailsPage.ge_details_tab(self)
コード例 #2
0
ファイル: SmokeTests.py プロジェクト: csadek/Automation-Game
    def test_smoke_testcase2(self,productName,Category,surAddress, surName, firstName, email, company, address, zipCode,
                                                town, country, phone):
        ManageBillingAddressPage.navigate_to_manage_billing(self)
        old_billing_no = len(ManageBillingAddressPage.get_billingAddress_list(self).options)
        ManageBillingAddressPage.Create_Another_Address(self, surAddress, surName, firstName, email, company, address,
                                                        zipCode, town, country, phone)

        # assert that the new address is created and added to drop down list
        self.assertIn('Your new address was created.', ManageBillingAddressPage.get_createAddress_msg(self))
        self.assertEqual(old_billing_no+1, len(ManageBillingAddressPage.get_billingAddress_list(self).options))
        self.assertEqual(old_billing_no+1 , len(ManageBillingAddressPage.get_shippingAddress_list(self).options))

        # Make the added address is default billing and shipping address
        ManageBillingAddressPage.get_billingAddress_list(self).select_by_visible_text(surAddress)
        ManageBillingAddressPage.get_shippingAddress_list(self).select_by_visible_text(surAddress)
        SearchPage.search_data(self,productName,Category)
        self.assertIn('Confirmation of your order',PaymentPages.pay_product(self,'grey','Large','2'))
        self.driver.get_screenshot_as_file('screenshot_PayConfirm.jpg')
        self.assertEqual('Payment pending',FollowUpOrdersPage.FollowOrder(self))
コード例 #3
0
ファイル: Payment.py プロジェクト: csadek/Automation-Game
 def test_payment(self,userName,password,productName,Category):
     LoginLogoutPage.login_with_valid_credentials(self,userName,password)
     SearchPage.search_data(self,productName,Category)
     self.assertIn('Confirmation of your order',PaymentPages.pay_product(self,'grey','Large','2'))
     self.driver.get_screenshot_as_file('screenshot_PayConfirm.jpg')
コード例 #4
0
ファイル: Search.py プロジェクト: csadek/Automation-Game
 def test_search(self,username,password,scen,productName,Category,result):
     LoginLogoutPage.login_with_valid_credentials(self, username, password)
     self.assertIn(result,SearchPage.search_data(self,productName,Category))