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))
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')