def test_balance(self): # 能否显示流量钱包的账户余额 qianBao = mypage.Flow_wallet(driver) try: assert qianBao.try_find( mypage.Flow_wallet.accountBalance_loc) is True logging.info('显示流量钱包的账户余额') except: logging.warning("找不到流量钱包的账户余额") qianBao.get_screenshot("找不到流量钱包的账户余额") raise
def test_mingXi(self): # 能否进入到流量明细页面 qianBao = mypage.Flow_wallet(driver) qianBao.flowDetails() try: assert qianBao.try_find( mypage.Flow_wallet.flowDetails_pan_loc) is True logging.info('进入到流量明细页面') except: logging.warning("找不到流量明细页面") qianBao.get_screenshot("找不到流量明细页面") raise finally: qianBao.back()
def test_ActivityRules(self): # 能否进入活动规则 qianBao = mypage.Flow_wallet(driver) qianBao.activityRules() try: assert qianBao.try_find( mypage.Flow_wallet.activityRules_pan_loc) is True logging.info('进入活动规则') except: logging.warning("找不到活动规则的信息") qianBao.get_screenshot("找不到活动规则的信息") raise finally: qianBao.back()
def test_redPacketRecords(self): # 能否进入到红包记录页面 qianBao = mypage.Flow_wallet(driver) qianBao.redPacketRecords() try: assert qianBao.try_find( mypage.Flow_wallet.redPacketRecords_pan_loc) is True logging.info('进入到红包记录页面') except: logging.warning("找不到红包记录页面") qianBao.get_screenshot("找不到红包记录页面") raise finally: qianBao.back()
def test_tiQu_jiLu(self): # 能否进入到提取记录页面 qianBao = mypage.Flow_wallet(driver) qianBao.tiQu_jiLu() try: assert qianBao.try_find( mypage.Flow_wallet.tiQu_jiLu_pan_loc) is True logging.info('进入到提取记录页面') except: logging.warning("找不到提取记录页面") qianBao.get_screenshot("找不到提取记录页面") raise finally: qianBao.back()
def teardown(self): # 每次返回 qianBao = mypage.Flow_wallet(driver) qianBao.back() logging.info("返回")
def setup(self): # ,每次进入流量钱包 qianBao = mypage.Flow_wallet(driver) qianBao.wallet() logging.info("进入流量钱包")