Exemplo n.º 1
0
 def setup(self):  # 每个用例执行进入我的账单
     city = shouyepage.Cities(driver)
     city.dishi()
     city.qiehuan("湖南", "长沙")
     city.check_adBtn()
     test = shouyepage.Bill(driver)
     test.gengduo()
Exemplo n.º 2
0
 def test_wdezhangdan(self):  # 跳转我的账单是否正确    新增
     test = shouyepage.Bill(driver)
     time.sleep(3)
     test.bill()
     try:
         assert test.try_text(shouyepage.Shouye.title_loc) == "我的账单"
         logging.error('我的账单跳转正确')
     except:
         logging.info('我的账单跳转错误')
     finally:
         test.back()
Exemplo n.º 3
0
 def test_dangyue(self):  # 当月账单是否显示账户余额    新增
     test = shouyepage.Bill(driver)
     time.sleep(3)
     test.bill()
     try:
         assert test.try_find(shouyepage.Bill.yue_loc) is True
         logging.info('单月账单显示账户余额')
     except:
         logging.error('单月账单未账户余额')
         test.get_screenshot('单月账单未账户余额')
         raise
     finally:
         test.back()
Exemplo n.º 4
0
 def test_quchongzhi(self):  #去充值按钮跳转否正确     新增
     test = shouyepage.Bill(driver)
     test.bill()
     test.gobutton()
     try:
         assert test.try_text(shouyepage.Shouye.title_loc) == "充值中心"
         logging.info('充值中心跳转正确')
     except:
         logging.error('充值中心跳转错误')
         test.get_screenshot('充值中心跳转错误')
         raise
     finally:
         test.back()
         test.back()
Exemplo n.º 5
0
 def teardown(self):  # 每个用例结束返回
     test = shouyepage.Bill(driver)
     test.back()
     test.check_adBtn()  #关闭广告