예제 #1
0
 def test_yue(self):  # 是否显示可用余额
     yue = mypage.Balance(driver)
     try:
         assert yue.try_find(yue.keyong_loc) is True
         logging.info('显示可用余额')
     except:
         logging.warning("不显示可用余额")
         yue.get_screenshot("不显示可用余额")
         raise
예제 #2
0
 def test_xiaofei(self):  # 是否显示当前消费
     yue = mypage.Balance(driver)
     try:
         assert yue.try_find(yue.xiaofei_loc) is True
         logging.info('显示当前消费')
     except:
         logging.warning("不显示当前消费")
         yue.get_screenshot("不显示当前消费")
         raise
예제 #3
0
 def test_qu_chongzhi(self):  # 去充值按钮是否可用
     yue = mypage.Balance(driver)
     yue.quchongzhi()
     try:
         assert yue.try_find(yue.chongzhi_pan_loc) is True
         logging.info('进入到去充值页面')
     except:
         logging.warning("无法进入到去充值页面")
         yue.get_screenshot("无法进入到去充值页面")
         raise
     finally:
         yue.back()
예제 #4
0
 def test_zhangdan(self):  # 能否进入我的账单
     yue = mypage.Balance(driver)
     yue.zhangdan()
     try:
         assert yue.try_find(mypage.Balance.pan_zhangdan_loc) is True
         logging.info('无法进入我的账单')
     except:
         logging.warning("无法进入我的账单")
         yue.get_screenshot("无法进入我的账单")
         raise
     finally:
         yue.back()
예제 #5
0
 def test_taocan_banli(self):  # 是否进入套餐办理
     yue = mypage.Balance(driver)
     yue.taocan()
     try:
         assert yue.try_find(mypage.Balance.pan_taocan_loc) is True
         logging.info('进入套餐办理')
     except:
         logging.warning("无法进入套餐办理")
         yue.get_screenshot("无法进入套餐办理")
         raise
     finally:
         yue.back()
예제 #6
0
 def test_taocan_yuliang(self):  # 是否进入套餐余量
     yue = mypage.Balance(driver)
     yue.yuliang()
     try:
         assert yue.try_find(mypage.Balance.pan_yuliang_loc) is True
         logging.info('进入套餐余量')
     except:
         logging.warning("无法进入套餐余量")
         yue.get_screenshot("无法进入套餐余量")
         raise
     finally:
         yue.yuliang_back()
예제 #7
0
 def test_chongzhi_jiaofei(self):  # 是否进入充值交费
     yue = mypage.Balance(driver)
     yue.chongzhi()
     try:
         assert yue.try_find(mypage.Balance.pan_chongzhi_loc) is True
         logging.info('进入充值交费')
     except:
         logging.warning("无法进入充值交费")
         yue.get_screenshot("无法进入充值交费")
         raise
     finally:
         yue.back()
예제 #8
0
 def teardown(self):  # 每次返回
     yue = mypage.Balance(driver)
     yue.balance_back()
     logging.info('-------返回----------')
예제 #9
0
 def setup(self):  # 每次进入话费余额
     yue = mypage.Balance(driver)
     yue.balance()
     logging.info('-------进入话费余额----------')