def test_seven_color_Del_all_nu_ok_case(self): """验证确认投注页面,点击删除选号,点击确定""" ha = HomePage_leyou(self.driver) hb = RX9C_choosenumber_leyou(self.driver) hc = ConfirmLottery_leyou(self.driver) hc1 = PaintBallConfirm_leyou(self.driver) hc2 = PaintBallChooseNumber_leyou(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_options2_hand_choose3_case(self): '''山东11选5,任选二玩法,手选三个号流程测试''' hp = HomePage_leyou(self.driver) hp.open() ulcn = UnionLottoChooseNumber_leyou(self.driver) ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.sd_11_5_link() # 点击山东11选5链接 efcn = ElevenFiveChooseNumber_leyou(self.driver) efcn.countdown_text() # 检查“距离第xxx期截止:”文案是否存在 efcn.spread_mode_button() ##选择展开玩法 efcn.mode_choose(22, 1) # 广西11选5任选二 efcn.hand_options(3) # 任选三个号 efcn.confirm_number_button() # 点击确认选号 ecfcl = EleChooseFiveConfirmLottery_leyou(self.driver) ecfcl.chase_ticket_input("3") # 输入追3期 ecfcl.throw_times_input("3") # 输入投3倍
def test_UnionLotto_after_many_note(self): """复式,多注一倍""" ha = HomePage_leyou(self.driver) hb = UnionLottoChooseNumber_leyou(self.driver) hc = ConfirmLottery_leyou(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.UnionLotto_link() # 点击双色球链接 hb.u_red_label18() # 任意选择18个红球 hb.u_bule_label1() # 任意选择1个蓝球 hb.Confirm_button() # 点击确认选号按钮 mur = hc.lottery_number_text() # 读取注数 self.assertEqual('18564', mur) ##断言 nu = hc.throw_time_text() ###倍数 self.assertEqual('1', nu) hc.submit_order_to_station_owner_button()
def test_play_instruction_open_close_case(self): '''在投注选号页面,点击右上角玩法说明,可以打开和关闭''' ha = HomePage_leyou(self.driver) hb = HaobcChooseNumber_leyou(self.driver) pbcn = PaintBallChooseNumber_leyou(self.driver) l = Login_leyou(self.driver) t = There_D_choosenumber_leyou(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.My_lottery_ticket() # 点击我的彩票 l.login_leyou() # 点击登录 ha.homepage_link() # 点击首页 ha.haobc_link() #点击竞彩蓝球 t.Instruct() #点击右上角的。。。 hb.Play_instruction() #点击玩法说明 t.There_D_know() #点击我知道了
def test_seven_color_history(self): """历史走势""" ha = HomePage_leyou(self.driver) hb = Seven_color_choosenumber_leyou(self.driver) hb2 = There_D_choosenumber_leyou(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.colorful_star_link() ###点击七星彩 hb2.Instruct() ##点击右上角... hb.Seven_color_history() ##点击历史走势 hb.Afive_down() ###鼠标下拉 mur = hb.History_date() ##随机取显示的数据 if mur == '': self.assertEqual('a', mur) else: print("历史走势展示正常")
def test_many_note_many_double_Continue_after_case(self): """多注多倍,继续选号,复式""" ha = HomePage_leyou(self.driver) hb = Seven_color_choosenumber_leyou(self.driver) hb2 = There_D_choosenumber_leyou(self.driver) hb1 = ArrangeFiveChooseNumber_leyou(self.driver) hc = ConfirmLottery_leyou(self.driver) hc1 = ArrangeFiveConfirmLottery_leyou(self.driver) hl = Login_leyou(self.driver) hd=LessPaySucess_leyou(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.rank_five_link() ###点击排列5 hb1.Afive_nuws(2) # 随机选择1个万位号码 hb1.Afive_nuqs(1) # 随机选择1个千位号码 hb1.Afive_nubs(1) # 随机选择1个百位号码 hb1.Afive_down() # 鼠标向下 hb1.Afive_nuss(1) # 随机选择1个十位号码 hb1.Afive_nugs(1) # 随机选择1个个位号码 hb1.Confirm_nu() # 点击确认选号按钮 mur1 = hc1.Test_note_nu() ##读取注数 self.assertEqual('2', mur1) hc1.Multiple_input(5) ###点击倍数输入功能 mur = hc1.Test_multiple_show() ##读取倍数 self.assertEqual('5', mur) hc1.Coun_nu()###点击继续选号 hb1.Afive_nuws(2) # 随机选择1个万位号码 hb1.Afive_nuqs(1) # 随机选择1个千位号码 hb1.Afive_nubs(1) # 随机选择1个百位号码 hb1.Afive_down() # 鼠标向下 hb1.Afive_nuss(1) # 随机选择1个十位号码 hb1.Afive_nugs(1) # 随机选择1个个位号码 hb1.Confirm_nu() # 点击确认选号按钮 mur = hc1.Test_multiple_show() ##读取倍数 self.assertEqual('5',mur) mur1 = hc1.Test_note_nu() ##读取注数 self.assertEqual('4', mur1) 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() # 点击确认支付 mur1 = hd.assect_pay() ##读取支付状态文本 self.assertEqual('订单提交成功', mur1)
def test_single_basketball_dxf_choose_num_clear_button_case(self): '''选号页面清除所选比赛流程测试''' hp = HomePage_leyou(self.driver) hcn = HaobcChooseNumber_leyou(self.driver) sbcn = SingleBasketballChooseNumber_leyou(self.driver) pbc = PaintBallConfirm_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) l = Login_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 > 0: hcn.clear_button() #点击清除按钮 sbcn.jldg_sf_choose(3) #选择3场比赛 hcn.confirm_match() #确认所选场次
def test_onestar_choose_all_cancel_case(self): '''一星玩法,选择所有选号,并取消流程测试''' hp = HomePage_leyou(self.driver) hp.open() l = Login_leyou(self.driver) efcn = ElevenFiveChooseNumber_leyou(self.driver) hp.Moveable_float_close() # 点击关闭浮窗 hp.My_lottery_ticket() # 点击我的彩票 l.login_leyou() # 点击登录 hp.homepage_link() # 点击首页 hp.cqssc_link() # 点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_leyou(self.driver) ssc_cn.play_mode() # 选择模式 ssc_cn.one_star() # 选择一星 ssc_cn.gewei_all() # 选择9个号码 ssc_cn.gewei_all()#取消选中的9个号码 aa = efcn.total_buy_text() self.assertIn("请至少选择1个号码", aa)
def test_throw_sub_btn_case(self): '''点击投注倍数的-按钮流程测试''' 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.Btn_less() #点击-按钮 text = cl.throw_time_text() self.assertIn('4', 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_haobc_rfsf_throw_way_case(self): '''改变默认投注过关方式流程测试''' 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(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_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_throw_way_case(self): '''改变默认投注过关方式流程测试''' 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(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_haobc_rfsf_9_case(self): '''选择九场比赛,获取“最大场次限制8场”提示,测试流程''' ###点击进入双色球选号页面### hp = HomePage_leyou(self.driver) hcn = HaobcChooseNumber_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) hp.open() hp.Moveable_float_close() hp.haobc_link() ##点击竞篮 hcn.Play_f() #选择玩法 hcn.Play_rfsf() #选择让分胜负 aa = hcn.sf_choose(9) # 选择比赛 if aa != 0 and aa != 3: try: hcn.know() except ElementNotVisibleException: print("当前场次小于8场") hcn.confirm_match() #确认赛事
def test_Direct_add_Del_all_nu_ok_case(self): """验证确认投注页面,点击删除选号图标功能""" ha = HomePage_leyou(self.driver) hb = UnionLottoChooseNumber_leyou(self.driver) hc = ConfirmLottery_leyou(self.driver) hc1 = PaintBallChooseNumber_leyou(self.driver) hd = PaintBallConfirm_leyou(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_immediately_reture_homepage(self): '''在投注选号页面,点击右上角即时比分,可以打开并返回首页''' 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) t = There_D_choosenumber_leyou(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.My_lottery_ticket() # 点击我的彩票 l.login_leyou() # 点击登录 hp.homepage_link() # 点击首页 hp.haobc_link() #点击竞彩蓝球 t.Instruct() # 点击右上角的。。。 pbcn.immediately() # 点击即时比分 pbcn.immediately_page_return_homepage() #点击返回首页
def test_haobc_rfsf_throw_sub_btn_case(self): '''点击投注倍数的-按钮流程测试''' 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.Btn_less() #点击-按钮 text = cl.throw_time_text() self.assertIn('4', text)
def test_play_instruction_open_close_case(self): '''在投注选号页面,点击右上角玩法说明,可以打开和关闭''' 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) sos = SubmitOrderSuccess_leyou(self.driver) t = There_D_choosenumber_leyou(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.My_lottery_ticket() # 点击我的彩票 l.login_leyou() # 点击登录 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_leyou(self.driver) pbcn = PaintBallChooseNumber_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) pbc = PaintBallConfirm_leyou(self.driver) hl = Login_leyou(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.NN() ###读取删除前有多少个X按钮 pbc.N_del(1) ##点击删除第一场赛事 pbcn.rqspf_choose(2) ###随机点击2场比赛
def test__haobc_rfsf_choose_num_clear_button_case(self): '''选号页面清除所选比赛流程测试''' hp = HomePage_leyou(self.driver) hcn = HaobcChooseNumber_leyou(self.driver) pbc = PaintBallConfirm_leyou(self.driver) cl = ConfirmLottery_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.clear_button() #点击清除按钮 hcn.sf_choose(3) #选择3场比赛 hcn.confirm_match() #确认所选场次 text = pbc.Pf_pass_text() #获取过关方式文本 self.assertIn("3串1", text)
def test_paintball_rqtwo_choose_one_9_case(self): '''选择九场比赛,获取“最大场次限制8场”提示,测试流程''' hp = HomePage_leyou(self.driver) pbcn = PaintBallChooseNumber_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) hp.open() hp.Moveable_float_close() hp.paintball_link() ##点击竞足 pbcn.Play_f() #选择玩法 pbcn.Play_2x1() #选择二选一 aa = pbcn.two_choose_one_choose(9) # 选择比赛 if aa == 2: try: pbcn.know() except ElementNotVisibleException: print("当前场次小于8场") pbcn.confirm_match() # 确认所选场次 else: print("我返回了")
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_single_basketball_dxf_throw_sub_btn_case(self): '''点击投注倍数的-按钮流程测试''' 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_dxf() # 选择大小分 aa = sbcn.jldg_sf_choose(2) # 选择比赛 if aa == 2: hcn.confirm_match() # 点击确认赛事 pbc.Btn_less() #点击-按钮 text = cl.throw_time_text() self.assertIn('4', 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_choose_num_clear_button_case(self): '''选号页面清除所选比赛流程测试''' 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) hp.open() hp.Moveable_float_close() hp.paintball_link() ##点击竞足 pbcn.Play_f() # 选择玩法 pbcn.Play_spf() # 选择胜平负 aa = pbcn.spf_choose(2) # 选择比赛 if aa == 2: pbcn.clear_button() #点击清除按钮 pbcn.spf_choose(3) #选择3场比赛 pbcn.confirm_match() #确认所选场次 text = pbc.Pf_pass_text() #获取过关方式文本 self.assertIn("3串1", 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_UnionLotto_risk(self): """验证购彩风险""" ha = HomePage_leyou(self.driver) hb = UnionLottoChooseNumber_leyou(self.driver) hc = ConfirmLottery_leyou(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.Risk() ##点击用户协议 hc.Risk_know() ##点击用户协议我知道了 mur = hc.lottery_number_text() # 读取注数 self.assertEqual('1', mur) ##断言 nu = hc.throw_time_text() ###倍数 self.assertEqual('1', nu) hc.submit_order_to_station_owner_button()
def optimize_award_case(self): '''验证奖金优化流程测试''' hp = HomePage_leyou(self.driver) pbcn = PaintBallChooseNumber_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) pbc = PaintBallConfirm_leyou(self.driver) hl = Login_leyou(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_seven_color_Del_all_nu_case(self): """验证确认投注页面,点击删除选号图标功能""" ha = HomePage_leyou(self.driver) hb = PaintBallChooseNumber_leyou(self.driver) hb1 = HaobcChooseNumber_leyou(self.driver) hc = ConfirmLottery_leyou(self.driver) hb2 = There_D_choosenumber_leyou(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.haobc_link() # 点击竞彩蓝球 hb.Play_f() # 选择玩法 hb.Play_mix() ###点击混合投注 aa = hb1.Basketball_mix_nus_X(2) # 选择比赛 if aa == 2: hb.confirm_match() ###点击已选N场比赛 hc.delete_all_num_button() ###点击清除所有选号 mur = hb2.Clear() self.assertEqual('清空', mur)
def test_single_basketball_dxf_9_case(self): '''选择九场比赛,获取“最大场次限制8场”提示,测试流程''' ###点击进入双色球选号页面### hp = HomePage_leyou(self.driver) hcn = HaobcChooseNumber_leyou(self.driver) sbcn = SingleBasketballChooseNumber_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) hp.open() hp.Moveable_float_close() hp.single_basketball_link() ##点击竞篮单关 hcn.Play_f() #选择玩法 hcn.Play_dxf() #选择大小分 aa = sbcn.jldg_sf_choose(9) # 选择比赛 if aa != 0 and aa != 3: try: hcn.know() except ElementNotVisibleException: print("当前场次小于8场") hcn.confirm_match() #确认赛事