poco(text="微信").click() poco.swipe([0.5, 0.4], [0.5, 0.8], duration=1) poco(text="PP视频").click() vip = Vip() login = Login('weixin') #会员--微信登录--退出 thirdLoginRes = login.ThirdAuthLogin(2) try: if (thirdLoginRes): print('登录结果:', thirdLoginRes) poco(text="开通会员").click() res = vip.clickBuy("1个月16元原价20元") assert_equal(res, True, '1个月16元原价20元-调起支付-展示金额正确16元') except: print('error') pass try: vipRes = vip.Bydesc() swipeStartIndex(2, 'down') print('连续包月说明:', vipRes) assert_equal(vipRes, True, '协议连接正确') #退出登录--todo quit(2, 1) login.logOut(2) except: print('error') pass
try: res = longVideo.videoRightShow('vipUserVideoRightBtnShow', 'vipPay') except: print('VIP用户--右--付费') pass quit() checkResult(res, '22VIP用户--右--付费') try: res = longVideo.videoCenterShow('vipUserVideoCenterBtnShow', 'vipTicket') except: print('VIP用户--中心--用券') pass quit() checkResult(res, '33VIP用户--中心--用券') try: res = longVideo.videoCenterShow('vipUserVideoCenterBtnShow', 'vipPay') except: print('VIP用户--中心--付费') pass quit() checkResult(res,'44VIP用户--中心--付费') #退出登录 logoutRes = login.logOut(2) log('退出结果:', logoutRes) else: print('登录失败~~~~')
print('------') pass else: try: assert_equal(data, True, msg) except: print('------') pass #我的--微信登录-退出 try: thirdLoginRes = login.ThirdAuthLogin(1) log('res;', thirdLoginRes) if (thirdLoginRes): logoutRes = login.logOut() log('退出结果', logoutRes) except: print('微信登录--我的--失败') pass checkResult(thirdLoginRes, '微信登录--我的') #会员--微信登录--退出 try: thirdLoginRes = login.ThirdAuthLogin(2) if (thirdLoginRes): print('登录结果:', thirdLoginRes) login.logOut(2) except: print('微信登录--会员--失败') pass