Пример #1
0
 def clear_cache_cancel(self, case_name, second):  #清理缓存点取消
     try:
         time.sleep(second)
         my_page = MyPage()
         util = Utils()
         util.getElementById(MyHelper.driver, my_page.resid_my_button)
         #点击清理缓存,会弹出确认框
         util.getElementById(MyHelper.driver,
                             my_page.resid_clear_cache).click()
         #由于uiauto定位不到确认框元素,此处采用绝对定位
         #取消  128  680,245-744
         #确定  449  695,600 746
         #点击取消
         time.sleep(2)
         util.tap(MyHelper.driver, 128, 680, 245, 744)
         if second > 0:
             util.take_screenShot(MyHelper.driver, case_name, second)
         else:
             util.take_screenShot(MyHelper.driver, case_name, 0)
     except Exception as e:
         print("发现异常")
         print(e)
         Utils.getElementById(self, MyHelper.driver,
                              MyPage.resid_back_button)
         raise SystemError
Пример #2
0
 def to_cash_with_drawl(self, case_name):
     try:
         util = Utils()
         util.getElementById(CashWithDrawalHelper.driver,
                             MyPage.resid_my_button).click()
         util.getElementById(CashWithDrawalHelper.driver,
                             MyPage.resid_my_record).click()
         util.take_screenShot(CashWithDrawalHelper.driver, case_name, 2)
         util.getElementById(CashWithDrawalHelper.driver,
                             MyPage.resid_back_button).click()
     except Exception as e:
         print("发现异常")
         print(e)
         raise SystemError
Пример #3
0
 def to_exhibition_room(self,case_name,second):
     try:
         time.sleep(second)
         my_page = MyPage()
         util=Utils()
         util.getElementById(MyHelper.driver,my_page.resid_exhibitionRoom_button).click();
         print("点击大奖展厅完成")
         if second>0 :
             util.take_screenShot(MyHelper.driver,case_name,second)
         else:
             util.take_screenShot(MyHelper.driver,case_name,0)
     
         pass
     except Exception as e:
         print("发现异常")
         print(e)
         raise SystemError