示例#1
0
 def click_signin_button(self):
     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.d(resourceId="com.vova.android:id/tv_sign_in").click()
     log.i("点击SIGN IN按钮")
     self.d(resourceId="com.vova.android:id/tv_sign_in").wait_gone(timeout=1.0)
     if self.d(resourceId="com.vova.android:id/tv_sign_in").click_exists(timeout=1.0):
         log.i("二次点击SIGN IN按钮")  # 兼容低概率点不上的bug
示例#2
0
 def click_setting_button(self):
     if BasePage.element_is_exists(self.d(text="YOU MIGHT LIKE"), timeout=0) is False:
         self.find_element_by_swipe_up(self.d(text="YOU MIGHT LIKE"))  # 往下拉一拉再点,兼容点不上的情况
         log.i("经上滑已发现setting位置")
     self.d(resourceId="com.vova.android:id/tv_setting", text='Settings').click()
     log.i("点击Setting按钮")
     self.d(resourceId="com.vova.android:id/tv_setting", text='Settings').wait_gone(timeout=1.0)
     if self.d(resourceId="com.vova.android:id/tv_setting", text='Settings').click_exists(timeout=1.0):
         log.i("二次点击Setting按钮")  # 兼容低概率点不上的bug
示例#3
0
 def click_my_orders_button(self):
     if BasePage.element_is_exists(
             self.d(resourceId="com.vova.android:id/tv_my_orders_view_all"), timeout=1) is False:
         self.find_element_by_swipe_down(self.d(resourceId="com.vova.android:id/tv_my_orders_view_all"))
         time.sleep(.5)
     self.d(resourceId="com.vova.android:id/tv_my_orders_view_all").click()
     log.i("点击orders列表按钮")
     self.d(resourceId="com.vova.android:id/tv_my_orders_view_all").wait_gone(timeout=1.0)
     if self.d(resourceId="com.vova.android:id/tv_my_orders_view_all").click_exists(timeout=1.0):
         log.i("二次点击orders列表按钮")  # 兼容低概率点不上的bug