def test_throw10_case(self): '''选择投10倍流程测试''' hp = HomePage_leyou(self.driver) pbcn = PaintBallChooseNumber_leyou(self.driver) sfcn = SingleFootChooseNumber_leyou(self.driver) sfcl = SingleFootConfirmLottery_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) pbc = PaintBallConfirm_leyou(self.driver) l = Login_leyou(self.driver) hp.open() hp.Moveable_float_close() hp.single_foot_link() ##点击竞足 pbcn.Play_f() # 选择玩法 pbcn.Play_2x1() # 选择2选1 aa = sfcn.jzdg_two_choose_one_choose(1) # 选择比赛 if aa > 0: pbcn.confirm_match() # 点击确认赛事 pbc.Times_input_click() # 点击投注倍数 pbc.throw_times(10) # 点击投注10倍 text = sfcl.lottery_times_text() # 获取投注倍数文本 print(text) self.assertIn('1注10倍', text) if aa == 0: texxt = hp.header_text() #获取首页顶端文本 self.assertEqual("乐优炫彩", texxt)
def test_Play_sfc_Btn_hundred(self): """验证100倍按钮功能,支付流程""" ha = HomePage_leyou(self.driver) hb = HaobcChooseNumber_leyou(self.driver) hb1 = PaintBallChooseNumber_leyou(self.driver) hc = ConfirmLottery_leyou(self.driver) hc1 = PaintBallConfirm_leyou(self.driver) hc2 = SingleFootConfirmLottery_leyou(self.driver) hl = Login_leyou(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.single_basketball_link() ##点击竞篮单关 hb.Play_f() ####点击玩法 hb.Play_sfc() # 点击胜分差玩法 aa = hb.Basketball_sfc_nus_X(4) ###随机点击4场比赛 if aa > 0: hb.confirm_match() ###点击已选N场比赛 hc1.Times_input_click() #####点击倍数输入框 hc1.Times_number(100)####点击100倍 mul = hc2.Lottery_dgp() ###获取倍数 self.assertEqual('共9600元', mul) hc.submit_order_to_station_owner_button() ####点击提交给站主 # hl.new_user_login_tab() # 点击新登录 hl.login_leyou() # 输入账号,密码 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付
def test_Play_dgp_emptying(self): """验证选号页面清空按钮功能,支付流程""" ha = HomePage_leyou(self.driver) hb = PaintBallChooseNumber_leyou(self.driver) hb1 = SingleFootChooseNumber_leyou(self.driver) hc = ConfirmLottery_leyou(self.driver) hc1 = SingleFootConfirmLottery_leyou(self.driver) hc2 = PaintBallConfirm_leyou(self.driver) hl = Login_leyou(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: hb1.Emptying_pbs() ###点击清空 hb.confirm_match() ###点击已选N场比赛 hb1.Paintball_single_dgp_nus_X(1) ###随机点击1场比赛 hb.confirm_match() ###点击已选N场比赛 hc.submit_order_to_station_owner_button() ####点击提交给站主 hl.login_leyou() # 输入账号,密码 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_patintball_rqspf_input10000times_case(self): ##mj20171213 '''选号页面,选择2场对阵,增加倍数为10000倍,提交订单''' hp = HomePage_leyou(self.driver) pbcn = PaintBallChooseNumber_leyou(self.driver) pbc = PaintBallConfirm_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) l = Login_leyou(self.driver) sos = SubmitOrderSuccess_leyou(self.driver) hp.open() hp.Moveable_float_close() hp.My_lottery_ticket() # 点击我的彩票 l.login_leyou() # 点击登录 hp.homepage_link() # 点击首页 hp.paintball_link() ##点击竞足 pbcn.Play_f() # 选择玩法 pbcn.Play_rqspf() # 选择让球胜平负 aa = pbcn.rqspf_choose(2) # 选择比赛 if aa == 2: pbcn.confirm_match() # 确认所选场次 pbc.Times_input_click() # 点击投注倍数 pbc.Times_input(10000) #输入投注10000倍 cl.submit_order_to_station_owner_button() # 提交订单给站主 cl.confirm_and_pay_button() # 点击确认支付 text1 = sos.submit_order_success() # 获取提交订单成功文本 self.assertEqual('订单提交成功', text1)
def test_Play_dgp_Btn_eighty(self): """验证80倍按钮功能,支付流程""" ha = HomePage_leyou(self.driver) hb = PaintBallChooseNumber_leyou(self.driver) hb1 = SingleFootChooseNumber_leyou(self.driver) hc = ConfirmLottery_leyou(self.driver) hc1 = SingleFootConfirmLottery_leyou(self.driver) hc2 = PaintBallConfirm_leyou(self.driver) hl = Login_leyou(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) ###随机点击2场比赛 if aa > 0: hb.confirm_match() ###点击已选N场比赛 hc2.Times_input_click() #####点击倍数输入框 hc2.Times_number(80) ####点击80倍 mul = hc1.Lottery_dgp() ###获取倍数 self.assertEqual('共960元', mul) hc.submit_order_to_station_owner_button() ####点击提交给站主 # hl.new_user_login_tab() # 点击新登录 hl.login_leyou() # 输入账号,密码 hc2.Times_input(10) #####修改倍数为3 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付
def test_Play_zjq_Btn_eighty(self): """验证80倍按钮功能,支付流程""" ha = HomePage_leyou(self.driver) hb = PaintBallChooseNumber_leyou(self.driver) hb1 = SingleFootChooseNumber_leyou(self.driver) hc = ConfirmLottery_leyou(self.driver) hc1 = PaintBallConfirm_leyou(self.driver) hc2 = SingleFootConfirmLottery_leyou(self.driver) hl = Login_leyou(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(80) ####点击80倍 mul = hc2.Times_display_pbs() ###获取倍数 self.assertIn('80倍', mul) hc.submit_order_to_station_owner_button() ####点击提交给站主 # hl.new_user_login_tab() # 点击新登录 hl.login_leyou() # 输入账号,密码 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付
def test_Play_bf_Btn_ten(self): """验证10倍按钮功能,支付流程""" ha = HomePage_leyou(self.driver) hb = PaintBallChooseNumber_leyou(self.driver) hc = ConfirmLottery_leyou(self.driver) hc1 = PaintBallConfirm_leyou(self.driver) hl = Login_leyou(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.paintball_link() ##点击竞彩足球 hb.Play_f() ###点击玩法 hb.Play_bf() ##点击比分 aa = hb.Football_bfs_X(2) ###随机点击2场比赛 if aa > 0: hb.confirm_match() ###点击已选N场比赛 hc1.Times_input_click() #####点击倍数输入框 hc1.Times_number(10) ####点击10倍 mul = hc1.Times_display() ###获取倍数 self.assertEqual('10', mul) hc.submit_order_to_station_owner_button() ####点击提交给站主 # hl.new_user_login_tab() # 点击新登录 hl.login_leyou() # 输入账号,密码 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付
def test_patintball_rqspf_input10000times_case(self): ##mj20171213 '''选号页面,选择八场对阵,增加倍数为10000倍,提交订单''' ha = HomePage_leyou(self.driver) hb = PaintBallChooseNumber_leyou(self.driver) hb1 = HaobcChooseNumber_leyou(self.driver) hc = ConfirmLottery_leyou(self.driver) hc1 = PaintBallConfirm_leyou(self.driver) hc2 = ArrangeFiveConfirmLottery_leyou(self.driver) hl = Login_leyou(self.driver) hd = SubmitOrderSuccess_leyou(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.My_lottery_ticket() # 点击我的彩票 hl.login_leyou() # 点击登录 ha.homepage_link() # 点击首页 ha.haobc_link() # 点击竞彩蓝球 hb.Play_f() # 选择玩法 hb.Play_mix() ###点击混合投注 aa = hb1.Basketball_mix_nus_X(8) # 选择比赛 if aa == 8: hb.confirm_match() ###点击已选N场比赛 hc1.Times_input_click() # 点击投注倍数 hc1.Times_input(10000) #输入投注10000倍 hc.submit_order_to_station_owner_button() # 提交订单给站主 hc.confirm_and_pay_button() # 点击确认支付 text1 = hd.submit_order_success() # 获取提交订单成功文本 self.assertEqual('订单提交成功', text1)
def test_Play_mix_Btn_eighty(self): """验证80倍按钮功能,支付流程""" ha = HomePage_leyou(self.driver) hb = HaobcChooseNumber_leyou(self.driver) hb1 = PaintBallChooseNumber_leyou(self.driver) hc = ConfirmLottery_leyou(self.driver) hc1 = PaintBallConfirm_leyou(self.driver) hl = Login_leyou(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.Times_input_click() #####点击倍数输入框 hc1.Times_number(80) ####点击80倍 mul = hc1.Times_display() ###获取倍数 self.assertEqual('80', mul) hc.submit_order_to_station_owner_button() ####点击提交给站主 # hl.new_user_login_tab() # 点击新登录 hl.login_leyou() # 输入账号,密码 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付
def test_input_throw_times_case(self): '''输入投注3倍测试流程''' hp = HomePage_leyou(self.driver) pbcn = PaintBallChooseNumber_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) pbc = PaintBallConfirm_leyou(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.Times_input_click() #点击投注倍数输入框 pbc.Times_input(3) #输入投注3倍 text = cl.throw_time_text() self.assertIn('3', text)
def test_haobc_rfsf_input_throw_times_case(self): '''输入投注3倍测试流程''' hp = HomePage_leyou(self.driver) hcn = HaobcChooseNumber_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) pbc = PaintBallConfirm_leyou(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_throw10_case(self): '''选择投10倍流程测试''' hp = HomePage_leyou(self.driver) pbcn = PaintBallChooseNumber_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) pbc = PaintBallConfirm_leyou(self.driver) l = Login_leyou(self.driver) hp.open() hp.paintball_link() ##点击竞足 pbcn.Play_f() # 选择玩法 pbcn.Play_rqspf() # 选择让球胜平负 aa = pbcn.rqspf_choose(2) # 选择比赛 if aa == 2: pbcn.confirm_match() #点击确认赛事 pbc.Times_input_click() #点击投注倍数 pbc.throw_times(10) #点击投注10倍 text = cl.throw_time_text() #获取投注倍数文本 print(text) self.assertIn('10', text)
def test_single_basketball_dxf_input_throw_times_case(self): '''输入投注3倍测试流程''' hp = HomePage_leyou(self.driver) hcn = HaobcChooseNumber_leyou(self.driver) sbcn = SingleBasketballChooseNumber_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) pbc = PaintBallConfirm_leyou(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_haobc_rfsf_throw100_case(self): '''选择投100倍流程测试''' hp = HomePage_leyou(self.driver) hcn = HaobcChooseNumber_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) pbc = PaintBallConfirm_leyou(self.driver) l = Login_leyou(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(100) # 点击投注100倍 text = cl.throw_time_text() self.assertIn('100', text)
def test_throw80_case(self): '''选择投80倍流程测试''' hp = HomePage_leyou(self.driver) pbcn = PaintBallChooseNumber_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) pbc = PaintBallConfirm_leyou(self.driver) l = Login_leyou(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(80) # 点击投注80倍 text = cl.throw_time_text() self.assertIn('80', text)
def test_single_basketball_sf_throw20_case(self): '''选择投20倍流程测试''' hp = HomePage_leyou(self.driver) hcn = HaobcChooseNumber_leyou(self.driver) sbcn = SingleBasketballChooseNumber_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) pbc = PaintBallConfirm_leyou(self.driver) l = Login_leyou(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.Times_input_click() # 点击投注倍数 pbc.throw_times(20) # 点击投注20倍 text = cl.throw_time_text() self.assertIn('20', text)
def test_input_throw_times_case(self): '''输入投注3倍测试流程''' hp = HomePage_leyou(self.driver) pbcn = PaintBallChooseNumber_leyou(self.driver) sfcn = SingleFootChooseNumber_leyou(self.driver) sfcl = SingleFootConfirmLottery_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) pbc = PaintBallConfirm_leyou(self.driver) hp.open() hp.Moveable_float_close() hp.single_foot_link() ##点击竞足 pbcn.Play_f() # 选择玩法 pbcn.Play_rqspf() # 选择让球胜平负 aa = sfcn.jzdg_rqspf_choose(1) # 选择比赛 if aa > 0: pbcn.confirm_match() # 点击确认赛事 pbc.Times_input_click() # 点击投注倍数输入框 pbc.Times_input(3) # 输入投注3倍 text = sfcl.lottery_times_text() # 获取投注倍数文本 self.assertIn('1注3倍', text) if aa == 0: text = sfcn.Play_dgp_text() self.assertIn("单关配", text)
def test_Play_dgp_Pf_del_icon(self): """验证删除选择的全部赛事图标,支付流程""" ha = HomePage_leyou(self.driver) hb = PaintBallChooseNumber_leyou(self.driver) hb1 = SingleFootChooseNumber_leyou(self.driver) hc = ConfirmLottery_leyou(self.driver) hc1 = SingleFootConfirmLottery_leyou(self.driver) hc2 = PaintBallConfirm_leyou(self.driver) hl = Login_leyou(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.down_bf() hc2.Pf_del_icon() ##点击删除图标 hc.confirm_delete_button() hb.top_more() hb1.Paintball_single_dgp_nus_X(1) mul = hb.Text_confirm_loc() self.assertEqual('已选%d场比赛' % aa, mul) hb.confirm_match() ###点击已选N场比赛 hc.submit_order_to_station_owner_button() ####点击提交给站主 hl.login_leyou() # 输入账号,密码 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_throw100_case(self): '''选择投100倍流程测试''' hp = HomePage_leyou(self.driver) pbcn = PaintBallChooseNumber_leyou(self.driver) sfcn = SingleFootChooseNumber_leyou(self.driver) sfcl = SingleFootConfirmLottery_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) pbc = PaintBallConfirm_leyou(self.driver) l = Login_leyou(self.driver) hp.open() hp.Moveable_float_close() hp.single_foot_link() ##点击竞足 pbcn.Play_f() # 选择玩法 pbcn.Play_spf() # 选择胜平负 aa = sfcn.jzdg_spf_choose(1) # 选择比赛 if aa > 0: pbcn.confirm_match() # 点击确认赛事 pbc.Times_input_click() # 点击投注倍数 pbc.throw_times(100) # 点击投注100倍 text = sfcl.lottery_times_text() #获取投注倍数文本 self.assertIn('1注100倍', text) if aa == 0: text = sfcn.Play_dgp_text() self.assertIn("单关配", text)