예제 #1
0
 def test_04_logout(self):
     '''用户登出'''
     BaseSteps.user_logout()
     if BasePage.element_is_exists(
             self.d(resourceId="com.vova.android:id/tv_sign_in"),
             timeout=0) is False:
         self.find_element_by_swipe_down(
             self.d(resourceId="com.vova.android:id/tv_sign_in"))
     self.assertTrue(
         self.d(resourceId="com.vova.android:id/tv_sign_in",
                text='SIGN IN').exists(timeout=4))
예제 #2
0
    def test_04_login_to_checkout_pay(self):
        '''印度UPI-登录后支付'''
        BaseSteps.user_logout()
        BaseSteps.search_goods_by_id(self.test_data['normal_goods_id'])
        BaseSteps.buy_goods_with_attr(self.test_data['normal_goods_attr'])
        bag.bag_page().click_checkout_button()
        login.login_page().wait_page()
        login.login_page().login(self.test_data['user_name_02'],
                                 self.test_data['password_02'])

        checkout_v2.checkout_page().wait_page()
        BaseSteps.ensure_needed_country_and_address('India')
        BaseSteps.checkout_to_change_payment_method('UPI')

        payment.payment_page().input_pay_code("UPI", self.PAN)
        payment.payment_page().click_confirm_to_pay()
        if self.test_env == "test":
            self.wait_element_then_screenshot(self.d(resourceId="root"))
        else:
            self.wait_element_then_screenshot(self.d(resourceId="tab-title"))