def test_Play_dgp_choosnumber(self): """验证单关配玩法赛事结果功能,支付流程""" ha = HomePage(self.driver) hb = PaintBallChooseNumber(self.driver) hb1 = SingleFootChooseNumber(self.driver) hc = ConfirmLottery(self.driver) hc1 = SingleFootConfirmLottery(self.driver) hc2 = PaintBallConfirm(self.driver) hl = Login(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.single_foot_link() ###点击竞足单关 hb.Play_f() ####点击玩法 hb1.Play_dgp() ###点击单关配 sleep(1) hb1.Dgp_tan() ##点击弹框 aa = hb1.Paintball_single_dgp() # 点击展开投注 if aa == 1: hb1.Paintball_single_dgp_nus_X(1) hb.confirm_match() ###点击已选N场比赛 hc.submit_order_to_station_owner_button() ####点击提交给站主 hl.login() # 输入账号,密码 hc.submit_order_to_station_owner_button() # 点击提交给站主 hb1.Know_dgp() ##点击我知道了 hc2.Times_input_click() #####点击倍数输入框 hc2.Times_number(10) ####点击10倍 hc.submit_order_to_station_owner_button() ####点击提交给站主 # hl.new_user_login_tab() # 点击新登录 hc.confirm_and_pay_button() # 点击确认支付
def test_Play_dgp_Btn_less(self): """验证修改倍数 - 功能,支付流程""" ha = HomePage(self.driver) hb = PaintBallChooseNumber(self.driver) hb1 = SingleFootChooseNumber(self.driver) hc = ConfirmLottery(self.driver) hc1 = SingleFootConfirmLottery(self.driver) hc2 = PaintBallConfirm(self.driver) hl = Login(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.single_foot_link() ###点击竞足单关 hb.Play_f() ####点击玩法 hb1.Play_dgp() ###点击单关配 sleep(1) hb1.Dgp_tan() ##点击弹框 aa = hb1.Paintball_single_dgp_nus_X(1) ###随机点击4场比赛 if aa > 0: hb.confirm_match() ###点击已选N场比赛 hc2.Times_input(34) #####修改倍数为3 hc2.Btn_less() ####点击倍数- mul = hc1.Lottery_dgp() ###获取倍数 self.assertEqual('共396元', mul) hc.submit_order_to_station_owner_button() ####点击提交给站主 # hl.new_user_login_tab() # 点击新登录 hl.login() # 输入账号,密码 hc2.Times_input(10) #####修改倍数为10 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付
def test_single_basketball_dxf_edit_event_case(self): '''验证投注确认页编辑赛事按钮测试流程''' hp = HomePage(self.driver) hcn = HaobcChooseNumber(self.driver) sbcn = SingleBasketballChooseNumber(self.driver) hc = HaobcConfirm(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) l = Login(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.single_basketball_link() ##点击竞篮单关 hcn.Play_f() # 选择玩法 hcn.Play_dxf() # 选择大小分 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("我已进入竞足单关")
def test_Play_dgp_Add_event(self): """验证添加/编辑赛事按钮,支付流程""" ha = HomePage(self.driver) hb = PaintBallChooseNumber(self.driver) hb1 = SingleFootChooseNumber(self.driver) hc = ConfirmLottery(self.driver) hc1 = SingleFootConfirmLottery(self.driver) hc2 = PaintBallConfirm(self.driver) hl = Login(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.single_foot_link() ###点击竞足单关 hb.Play_f() ####点击玩法 hb1.Play_dgp() ###点击单关配 sleep(1) hb1.Dgp_tan() ##点击弹框 aa = hb1.Paintball_single_dgp_nus_X(1) ###随机点击1场比赛 if aa > 0: hb.confirm_match() ###点击已选N场比赛 hc2.Add_event_rqspf() ###点击编辑/添加赛事 mul = hb.Play_fb() ###读取文本 self.assertEqual('玩\n法', mul) hb.confirm_match() ###点击已选N场比赛 hc.submit_order_to_station_owner_button() ####点击提交给站主 hl.login() # 输入账号,密码 hc.submit_order_to_station_owner_button() # 点击提交给站主 hb1.Know_dgp() ##点击我知道了 hc2.Times_input_click() #####点击倍数输入框 hc2.Times_number(10) ####点击10倍 hc.submit_order_to_station_owner_button() ####点击提交给站主 # hl.new_user_login_tab() # 点击新登录 hc.confirm_and_pay_button() # 点击确认支付
def test_haobc_dxf_edit_event_case(self): '''验证投注确认页编辑赛事按钮测试流程''' hp = HomePage(self.driver) hcn = HaobcChooseNumber(self.driver) hc = HaobcConfirm(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) l = Login(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.haobc_link() ##点击竞篮 hcn.Play_f() # 选择玩法 hcn.Play_dxf() # 选择大小分 aa = hcn.sf_choose(2) # 选择比赛 if aa == 2: hcn.confirm_match() # 点击确认赛事 sleep(3) hc.edit_event() #点击编辑赛事 sleep(3) 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_zjq_Pf_del_icon(self): """验证删除选择的全部赛事图标,支付流程""" ha = HomePage(self.driver) hb = PaintBallChooseNumber(self.driver) hb1 = SingleFootChooseNumber(self.driver) hc = ConfirmLottery(self.driver) hc1 = PaintBallConfirm(self.driver) hl = Login(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.single_foot_link() ###点击竞彩足球 hb.Play_f() ####点击玩法 hb.Play_zq() ###点击总进球 aa = hb1.Paintball_single_zjq_nus_X(4) ###随机点击4场比赛 if aa > 0: hb.confirm_match() ###点击已选N场比赛 hc1.Pf_del_icon() hc.confirm_delete_button() hb1.Paintball_single_zjq_nus_X(4) mul = hb.Text_confirm_loc() self.assertEqual('已选%d场比赛' % aa, mul) hb.confirm_match() ###点击已选N场比赛 hc.submit_order_to_station_owner_button() ####点击提交给站主 # hl.new_user_login_tab() # 点击新登录 hl.login() # 输入账号,密码 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付
def test_Play_zjq_Btn_ten(self): """验证10倍按钮功能,支付流程""" ha = HomePage(self.driver) hb = PaintBallChooseNumber(self.driver) hb1 = SingleFootChooseNumber(self.driver) hc = ConfirmLottery(self.driver) hc1 = PaintBallConfirm(self.driver) hc2 = SingleFootConfirmLottery(self.driver) hl = Login(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.single_foot_link() ###点击竞彩足球 hb.Play_f() ####点击玩法 hb.Play_zq() #####点击总进球 aa = hb1.Paintball_single_zjq_nus_X(2) ###随机点击2场比赛 if aa > 0: hb.confirm_match() ###点击已选N场比赛 hc1.Times_input_click() #####点击倍数输入框 hc1.Times_number(10) ####点击10倍 mul = hc2.Times_display_pbs() ###获取倍数 self.assertIn('10倍', mul) hc.submit_order_to_station_owner_button() ####点击提交给站主 # hl.new_user_login_tab() # 点击新登录 hl.login() # 输入账号,密码 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付
def test_Play_zjq_Add_event(self): """验证添加/编辑赛事按钮,支付流程""" ha = HomePage(self.driver) hb = PaintBallChooseNumber(self.driver) hb1 = SingleFootChooseNumber(self.driver) hc = ConfirmLottery(self.driver) hc1 = PaintBallConfirm(self.driver) hl = Login(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.single_foot_link() ###点击竞彩足球 hb.Play_f() ####点击玩法 hb.Play_zq() ###点击总进球 aa = hb1.Paintball_single_zjq_nus_X(4) ###随机点击4场比赛 if aa > 0: hb.confirm_match() ###点击已选N场比赛 hc1.Add_event_rqspf() ###点击编辑/添加赛事 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() # 输入账号,密码 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付
def test_seven_color_Del_all_nu_ok_case(self): """验证确认投注页面,点击删除选号,点击确定""" ha = HomePage(self.driver) hb = RX9C_choosenumber(self.driver) hc = ConfirmLottery(self.driver) hc1 = PaintBallConfirm(self.driver) hc2 = PaintBallChooseNumber(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.victory_defeat_14_link() # 点击胜负14场 a = hb.Games_nus(14, 1) ###点击9展示的赛事结果 if a == 1: hb.Confirm_pick() ###点击确认选号 hc1.Pf_del_icon() ###点击清除所有选号 mur = hc2.Play_fb() self.assertEqual('期\n号', mur)
def test_UnionLotto_unitary_del_X(self): """左边X按钮,能够删除所选号码""" ha = HomePage(self.driver) hb = UnionLottoChooseNumber(self.driver) hc = ConfirmLottery(self.driver) hc1 = PaintBallChooseNumber(self.driver) hd = PaintBallConfirm(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.UnionLotto_link() # 点击双色球链接 hb.u_red_label6() # 任意选择6个红球 hb.u_bule_label1() # 任意选择1个蓝球 hb.Confirm_button() # 点击确认选号按钮 hc.Del_x() ##点击左侧X按钮 mur1 = hc1.Play_fb() self.assertEqual('玩\n法', mur1)
def test_single_basketball_sf_choose_num_clear_button_case(self): '''选号页面清除所选比赛流程测试''' hp = HomePage(self.driver) hcn = HaobcChooseNumber(self.driver) sbcn = SingleBasketballChooseNumber(self.driver) pbc = PaintBallConfirm(self.driver) cl = ConfirmLottery(self.driver) l = Login(self.driver) hp.open() hp.Moveable_float_close() hp.single_basketball_link() ##点击竞篮单关 hcn.Play_f() # 选择玩法 hcn.Play_sf() # 选择胜负 aa = sbcn.jldg_sf_choose(2) # 选择比赛 if aa > 0: hcn.clear_button() #点击清除按钮 sbcn.jldg_sf_choose(3) #选择3场比赛 hcn.confirm_match() #确认所选场次
def test_Direct_add_Del_all_nu_ok_case(self): """验证确认投注页面,点击删除选号图标功能""" ha = HomePage(self.driver) hb = UnionLottoChooseNumber(self.driver) hc = ConfirmLottery(self.driver) hc1 = PaintBallChooseNumber(self.driver) hd = PaintBallConfirm(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.UnionLotto_link() # 点击双色球链接 hb.u_red_label6() # 任意选择6个红球 hb.u_bule_label1() # 任意选择1个蓝球 hb.Confirm_button() # 点击确认选号按钮 hc.delete_all_num_button() ###点击清除所有选号 hc.confirm_delete_button() # 点击确定 mur = hc1.Play_fb() self.assertEqual('玩\n法', mur)
def test_input_throw_times_case(self): '''输入投注3倍测试流程''' hp = HomePage(self.driver) pbcn = PaintBallChooseNumber(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) hp.open() hp.Moveable_float_close() hp.paintball_link() ##点击竞足 pbcn.Play_f() # 选择玩法 pbcn.Play_2x1() # 选择二选一 aa = pbcn.two_choose_one_choose(2) # 选择比赛 if aa == 2: pbcn.confirm_match() # 点击确认赛事 pbc.Times_input_click()#点击投注倍数输入框 pbc.Times_input(3)#输入投注3倍 text = cl.throw_time_text() self.assertIn('3',text)
def test_throw_sub_btn_case(self): '''点击投注倍数的-按钮流程测试''' hp = HomePage(self.driver) pbcn = PaintBallChooseNumber(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) l = Login(self.driver) hp.open() hp.Moveable_float_close() hp.paintball_link() ##点击竞足 pbcn.Play_f() # 选择玩法 pbcn.Play_2x1() # 选择二选一 aa = pbcn.two_choose_one_choose(2) # 选择比赛 if aa == 2: pbcn.confirm_match() # 点击确认赛事 pbc.Btn_less()#点击-按钮 text=cl.throw_time_text() self.assertIn('4',text)
def test_throw_way_case(self): '''改变默认投注过关方式流程测试''' hp = HomePage(self.driver) pbcn = PaintBallChooseNumber(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) hp.open() hp.Moveable_float_close() hp.paintball_link() ##点击竞足 pbcn.Play_f() # 选择玩法 pbcn.Play_2x1() # 选择二选一 aa = pbcn.two_choose_one_choose(8) # 选择比赛 if aa == 2: pbcn.confirm_match() # 点击确认赛事 pbc.Pf_pass()#点击过关方式 mul = pbc.Pf_pass_nu() ###读取点击的过关方式 a = pbc.Pf_pass_text() ###读取展示的过关方式 self.assertEqual(a, mul)
def test_immediately_reture_homepage(self): '''在投注选号页面,点击右上角即时比分,可以打开并返回首页''' hp = HomePage(self.driver) pbcn = PaintBallChooseNumber(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) l = Login(self.driver) t = There_D_choosenumber(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.My_lottery_ticket() # 点击我的彩票 l.login() # 点击登录 hp.homepage_link() # 点击首页 hp.haobc_link() #点击竞彩蓝球 t.Instruct() # 点击右上角的。。。 pbcn.immediately() # 点击即时比分 pbcn.immediately_page_return_homepage() #点击返回首页
def test_haobc_rfsf_throw_way_case(self): '''改变默认投注过关方式流程测试''' hp = HomePage(self.driver) hcn = HaobcChooseNumber(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) hp.open() hp.Moveable_float_close() hp.haobc_link() ##点击竞篮 hcn.Play_f() # 选择玩法 hcn.Play_rfsf() # 选择让分胜负 aa = hcn.sf_choose(8) # 选择比赛 if aa == 2: hcn.confirm_match() # 点击确认赛事 pbc.Pf_pass()#点击过关方式 mul = pbc.Pf_pass_nu() ###读取点击的过关方式 a = pbc.Pf_pass_text() ###读取展示的过关方式 self.assertEqual(a, mul)
def test_throw_add_btn_case(self): '''点击投注倍数的+按钮流程测试''' hp = HomePage(self.driver) pbcn = PaintBallChooseNumber(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) l = Login(self.driver) hp.open() hp.Moveable_float_close() hp.paintball_link() ##点击竞足 pbcn.Play_f() # 选择玩法 pbcn.Play_rqspf() # 选择让球胜平负 aa = pbcn.rqspf_choose(2) # 选择比赛 if aa == 2: pbcn.confirm_match() # 点击确认赛事 pbc.Btn_add() #点击+按钮 text = cl.throw_time_text() self.assertIn('6', text)
def test_haobc_rfsf_input_throw_times_case(self): '''输入投注3倍测试流程''' hp = HomePage(self.driver) hcn = HaobcChooseNumber(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) hp.open() hp.Moveable_float_close() hp.haobc_link() ##点击竞篮 hcn.Play_f() # 选择玩法 hcn.Play_rfsf() # 选择让分胜负 aa = hcn.sf_choose(2) # 选择比赛 if aa == 2: hcn.confirm_match() # 点击确认赛事 pbc.Times_input_click()#点击投注倍数输入框 pbc.Times_input(3)#输入投注3倍 text = cl.throw_time_text() self.assertIn('3',text)
def test_haobc_rfsf_throw_sub_btn_case(self): '''点击投注倍数的-按钮流程测试''' hp = HomePage(self.driver) hcn = HaobcChooseNumber(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) l = Login(self.driver) hp.open() hp.Moveable_float_close() hp.haobc_link() ##点击竞篮 hcn.Play_f() # 选择玩法 hcn.Play_rfsf() # 选择让分胜负 aa = hcn.sf_choose(2) # 选择比赛 if aa == 2: hcn.confirm_match() # 点击确认赛事 pbc.Btn_less()#点击-按钮 text=cl.throw_time_text() self.assertIn('4',text)
def test_throw100_case(self): '''选择投100倍流程测试''' hp = HomePage(self.driver) pbcn = PaintBallChooseNumber(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) l = Login(self.driver) hp.open() hp.Moveable_float_close() hp.paintball_link() ##点击竞足 pbcn.Play_f() # 选择玩法 pbcn.Play_2x1() # 选择二选一 aa = pbcn.two_choose_one_choose(2) # 选择比赛 if aa == 2: pbcn.confirm_match() # 点击确认赛事 pbc.Times_input_click() # 点击投注倍数 pbc.throw_times(100) # 点击投注100倍 text = cl.throw_time_text() self.assertIn('100', text)
def test_choose_num_clear_button_case(self): '''选号页面清除所选比赛流程测试''' hp = HomePage(self.driver) pbcn = PaintBallChooseNumber(self.driver) pbc = PaintBallConfirm(self.driver) cl = ConfirmLottery(self.driver) l = Login(self.driver) hp.open() hp.Moveable_float_close() hp.paintball_link() ##点击竞足 pbcn.Play_f() # 选择玩法 pbcn.Play_rqspf() # 选择让球胜平负 aa = pbcn.rqspf_choose(2) # 选择比赛 if aa == 2: pbcn.clear_button() #点击清除按钮 pbcn.rqspf_choose(3) #选择3场比赛 pbcn.confirm_match() #确认所选场次 text = pbc.Pf_pass_text() #获取过关方式文本 self.assertIn("3串1", text)
def test_play_instruction_open_close_case(self): '''在投注选号页面,点击右上角玩法说明,可以打开和关闭''' hp = HomePage(self.driver) pbcn = PaintBallChooseNumber(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) l = Login(self.driver) sos = SubmitOrderSuccess(self.driver) t = There_D_choosenumber(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.My_lottery_ticket() # 点击我的彩票 l.login() # 点击登录 hp.homepage_link() # 点击首页 hp.paintball_link() ##点击竞彩足球 t.Instruct() #点击右上角的。。。 pbcn.paintball_play_instruct() #点击玩法说明 t.There_D_know() #点击我知道了
def test_delete_double_event_case(self): """选择两场赛事,验证单个删除多场赛事X按钮,流程测试""" hp = HomePage(self.driver) pbcn = PaintBallChooseNumber(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) hl = Login(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.paintball_link() ##点击竞彩足球 pbcn.Play_f() ###点击玩法 pbcn.Play_rqspf() ##点击让球胜平负 aa = pbcn.rqspf_choose(2) ###随机点击2场比赛 if aa == 2: pbcn.confirm_match() ###点击确认赛事 pbc.Dxf_nn() ###读取删除前有多少个X按钮 pbc.DXF_del_n(1) ##点击删除第一场赛事 pbcn.rqspf_choose(2) ###随机点击2场比赛
def test__haobc_rfsf_choose_num_clear_button_case(self): '''选号页面清除所选比赛流程测试''' hp = HomePage(self.driver) hcn = HaobcChooseNumber(self.driver) pbc = PaintBallConfirm(self.driver) cl = ConfirmLottery(self.driver) l = Login(self.driver) hp.open() hp.Moveable_float_close() hp.haobc_link() ##点击竞篮 hcn.Play_f() # 选择玩法 hcn.Play_rfsf() # 选择让分胜负 aa = hcn.sf_choose(2) # 选择比赛 if aa==2: hcn.clear_button()#点击清除按钮 hcn.sf_choose(3)#选择3场比赛 hcn.confirm_match()#确认所选场次 text=pbc.Pf_pass_text()#获取过关方式文本 self.assertIn("3串1",text)
def test_single_basketball_dxf_input_throw_times_case(self): '''输入投注3倍测试流程''' hp = HomePage(self.driver) hcn = HaobcChooseNumber(self.driver) sbcn = SingleBasketballChooseNumber(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) hp.open() hp.Moveable_float_close() hp.single_basketball_link() ##点击竞篮单关 hcn.Play_f() # 选择玩法 hcn.Play_dxf() # 选择大小分 aa = sbcn.jldg_sf_choose(2) # 选择比赛 if aa == 2: hcn.confirm_match() # 点击确认赛事 pbc.Times_input_click() #点击投注倍数输入框 pbc.Times_input(3) #输入投注3倍 text = cl.throw_time_text() self.assertIn('3', text)
def test_single_basketball_sf_throw_add_btn_case(self): '''点击投注倍数的+按钮流程测试''' hp = HomePage(self.driver) hcn = HaobcChooseNumber(self.driver) sbcn = SingleBasketballChooseNumber(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) l = Login(self.driver) hp.open() hp.Moveable_float_close() hp.single_basketball_link() ##点击竞篮单关 hcn.Play_f() # 选择玩法 hcn.Play_sf() # 选择胜负 aa = sbcn.jldg_sf_choose(2) # 选择比赛 if aa == 2: hcn.confirm_match() # 点击确认赛事 pbc.Btn_add() #点击+按钮 text = cl.throw_time_text() self.assertIn('6', text)
def optimize_award_case(self): '''验证奖金优化流程测试''' hp = HomePage(self.driver) pbcn = PaintBallChooseNumber(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) hl = Login(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.paintball_link() ##点击竞彩足球 pbcn.Play_f() ###点击玩法 pbcn.Play_2x1() ##点击二选一 aa = pbcn.two_choose_one_choose(2) ###随机点击4场比赛 if aa > 0: pbcn.confirm_match() ###点击确认赛事 pbc.Pf_bouns()##点击奖金优化 text=pbc.optimize_award()#获取奖金优化页上方文本 self.assertIn("平均优化购买",text)
def test_haobc_rfsf_throw20_case(self): '''选择投20倍流程测试''' hp = HomePage(self.driver) hcn = HaobcChooseNumber(self.driver) cl = ConfirmLottery(self.driver) pbc = PaintBallConfirm(self.driver) l = Login(self.driver) hp.open() hp.Moveable_float_close() hp.haobc_link() ##点击竞篮 hcn.Play_f() # 选择玩法 hcn.Play_rfsf() # 选择让分胜负 aa = hcn.sf_choose(2) # 选择比赛 if aa == 2: hcn.confirm_match() # 点击确认赛事 pbc.Times_input_click() # 点击投注倍数 pbc.throw_times(20) # 点击投注20倍 text = cl.throw_time_text() self.assertIn('20', text)
def test_paintball_two_choose_one_2_case(self): '''选择两场比赛流程测试''' ###点击进入竞彩足球选号页面### hp=HomePage(self.driver) pbcn=PaintBallChooseNumber(self.driver) pbc = PaintBallConfirm(self.driver) cl = ConfirmLottery(self.driver) l=Login(self.driver) hp.open() hp.Moveable_float_close() hp.paintball_link()#####点击进入竞彩足球选号页面### pbcn.Play_f()#选择玩法 pbcn.Play_2x1()#选择二选一 aa=pbcn.two_choose_one_choose(2)#选择比赛 if aa==2: pbcn.confirm_match()#确认所选场次 cl.submit_order_to_station_owner_button()#提交订单给站主 l.login()#点击登录 cl.submit_order_to_station_owner_button() # 提交订单给站主 cl.confirm_and_pay_button()#确认支付