def test_haobc_sf_edit_event_case(self): '''验证投注确认页编辑赛事按钮测试流程''' hp = HomePage_lelun(self.driver) hcn = HaobcChooseNumber_lelun(self.driver) hc = HaobcConfirm_lelun(self.driver) cl = ConfirmLottery_lelun(self.driver) pbc = PaintBallConfirm_lelun(self.driver) l = Login_lelun(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.haobc_link() ##点击竞篮 hcn.Play_f() # 选择玩法 hcn.Play_sf() # 选择胜负 aa = hcn.sf_choose(2) # 选择比赛 if aa == 2: hcn.confirm_match() # 点击确认赛事 hc.edit_event() #点击编辑赛事 bb = hcn.sf_edit_event(1) #选择1场比赛 if bb == 1: print("场次小于两场") if bb == 2: hcn.confirm_match() # 点击确认赛事 text = pbc.Pf_pass_text() # 获取过关方式文本 print(text) self.assertIn("3串1", text) if bb == 3: print("我已进入竞足单关")
def test_Play_mix_Add_event(self): """验证添加/编辑赛事按钮,支付流程""" ha = HomePage_lelun(self.driver) hb = HaobcChooseNumber_lelun(self.driver) hb1 = PaintBallChooseNumber_lelun(self.driver) hc = ConfirmLottery_lelun(self.driver) hc1 = HaobcConfirm_lelun(self.driver) hl = Login_lelun(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.haobc_link() ##点击竞彩蓝球 hb.Play_f() ####点击玩法 hb.Play_mix() ##点击混合玩法 aa = hb.Basketball_mix_nus_X(4) ###随机点击4场比赛 if aa > 0: hb.confirm_match() ###点击已选N场比赛 hc1.edit_event() ###点击编辑/添加赛事 mul = hb.Play_fb() ###读取文本 self.assertEqual('玩\n法', mul) hb.confirm_match() ###点击已选N场比赛 hc.submit_order_to_station_owner_button() ####点击提交给站主 # hl.new_user_login_tab() # 点击新登录 hl.login_lelun() # 输入账号,密码 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付
def test_continue_toggle_play_case(self): """胜负玩法,点击编辑赛事,回到选号选号页面,切换玩法为混合投注""" ha = HomePage_lelun(self.driver) hb = PaintBallChooseNumber_lelun(self.driver) hb1 = HaobcChooseNumber_lelun(self.driver) hc = ConfirmLottery_lelun(self.driver) hc1 = PaintBallConfirm_lelun(self.driver) hc2 = HaobcConfirm_lelun(self.driver) hl = Login_lelun(self.driver) hd = SubmitOrderSuccess_lelun(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.My_lottery_ticket() # 点击我的彩票 hl.login_lelun() # 点击登录 ha.homepage_link() # 点击首页 ha.haobc_link() # 点击竞彩蓝球 hb.Play_f() # 选择玩法 hb1.Play_sf() #选择胜负 aa = hb1.sf_choose(2) #选择比赛 if aa == 2: hb.confirm_match() ###点击已选N场比赛 hc2.edit_event() ###点击编辑/添加赛事 hb.Play_f() # 选择玩法 hb.Play_mix() ###点击混合投注 aa = hb1.Basketball_mix_nus_X(2) # 选择比赛 if aa == 2: hb.confirm_match() ###点击已选N场比赛 hc.submit_order_to_station_owner_button() # 提交订单给站主 hc.confirm_and_pay_button() # 点击确认支付 text1 = hd.submit_order_success() # 获取提交订单成功文本 self.assertEqual('订单提交成功', text1)
def test_single_basketball_sf_edit_event_case(self): '''验证投注确认页编辑赛事按钮测试流程''' hp = HomePage_lelun(self.driver) hcn = HaobcChooseNumber_lelun(self.driver) sbcn = SingleBasketballChooseNumber_lelun(self.driver) hc = HaobcConfirm_lelun(self.driver) cl = ConfirmLottery_lelun(self.driver) pbc = PaintBallConfirm_lelun(self.driver) l = Login_lelun(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.single_basketball_link() ##点击竞篮单关 hcn.Play_f() # 选择玩法 hcn.Play_sf() # 选择胜负 aa = sbcn.jldg_sf_choose(1) # 选择比赛 if aa == 2: hcn.confirm_match() # 点击确认赛事 hc.edit_event() #点击编辑赛事 bb = sbcn.jldg_sf_edit_event(1) #选择1场比赛 if bb == 1: print("暂无赛事,已返回") ###返回首页的检查点 if bb == 2: hcn.confirm_match() # 点击确认赛事 #投注页获取注数的检查点,应该为2注1倍 if bb == 0: #只有一场的时候 print("我已进入竞足单关")