示例#1
0
 def test_001(self):  # 跳转流量管家是否正确
     traffic = shouyepage.Traffic(driver)
     try:
         assert traffic.try_text(shouyepage.Shouye.title_loc) == "流量查询"
         logging.info('跳转流量查询页面')
     except:
         logging.error("跳转流量管家错误")
         traffic.get_screenshot("跳转流量管家错误")
         raise
示例#2
0
 def test_005(self):  # 流量商品跳转是否正确
     traffic = shouyepage.Traffic(driver)
     traffic.shangpin()
     try:
         assert traffic.try_text(shouyepage.Shouye.title_loc) == "业务"
         logging.info('流量商品跳转正确')
     except:
         logging.error("流量商品跳转错误")
         traffic.get_screenshot("流量商品跳转错误")
         raise
     finally:
         traffic.back()
示例#3
0
 def test_003(self):  # 流量订单跳转是否正确
     traffic = shouyepage.Traffic(driver)
     traffic.dingdan()
     try:
         assert traffic.try_find(shouyepage.Traffic.chongzhi_loc) is True
         logging.info('流量订单跳转正确')
     except:
         logging.error("流量订单跳转错误")
         traffic.get_screenshot("流量订单跳转错误")
         raise
     finally:
         traffic.back()
示例#4
0
 def test_002(self):  # 分享增加微信快照
     traffic = shouyepage.Traffic(driver)
     traffic.fenxiang()
     try:
         assert traffic.try_find(shouyepage.Traffic.kuaizhao_loc) is True
         logging.info('分享增加微信快照')
     except:
         logging.error("分享未增加微信快照")
         traffic.get_screenshot("分享未增加微信快照")
         raise
     finally:
         traffic.quxiao()
示例#5
0
 def test_006(self):  # 流量详单跳转是否正确
     traffic = shouyepage.Traffic(driver)
     traffic.xiangdan()
     try:
         assert traffic.try_find(shouyepage.Traffic.shenfen_loc) is True
         logging.info('流量详单跳转正确')
     except:
         logging.error("流量详单跳转错误")
         traffic.get_screenshot("流量订单跳转错误")
         raise
     finally:
         traffic = loginpage.Login(driver)
         traffic.close()
示例#6
0
 def test_004(self):  # 境外流量跳转是否正确
     traffic = shouyepage.Traffic(driver)
     traffic.jingwai()
     time.sleep(3)
     try:
         assert traffic.try_text(shouyepage.Shouye.title_loc) == "国际/港澳台业务"
         logging.info('境外流量跳转正确')
     except:
         logging.error("境外流量跳转错误")
         traffic.get_screenshot("境外流量跳转错误")
         raise
     finally:
         traffic.back()
示例#7
0
 def teardown(self):  # 每个用例结束返回
     traffic = shouyepage.Traffic(driver)
     traffic.back()
示例#8
0
 def setup(self):  # 每个用例执行进入流量管家
     traffic = shouyepage.Traffic(driver)
     traffic.liuliang()