示例#1
0
 def test_Direct_all_choosenumber_case(self):
     """验证选号页面数字球功能"""
     ha = HomePage_leyou(self.driver)
     hb = Arrang_there_choosenumber_leyou(self.driver)
     hb1 = ArrangeFiveChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hl = Login_leyou(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.rank_three_link()  ####点击排列3
     hb.Play()  ###点击玩法
     hb.Play_Direct()  ####点击直选
     hb.there_bai()  ##点击百位全部数字
     hb.there_shi()  ##点击十位全部数字
     hb.there_ge()  ##点击个位全部数字
     hb.there_bai()  ##取消百位全部数字
     hb.there_shi()  ##取消十位全部数字
     hb.there_ge()  ##取消个位全部数字
     hb.there_bais(1)  #随机选取百位1个数字
     hb.there_shis(1)  #随机选取十位1个数字
     hb.there_ges(1)  #随机选择个位1个数字
     hb1.Confirm_nu()  #点击确认选号
     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()  # 点击确认支付
示例#2
0
 def test_Play_mix_Add_event(self):
     """验证添加/编辑赛事按钮,支付流程"""
     ha = HomePage_leyou(self.driver)
     hb = HaobcChooseNumber_leyou(self.driver)
     hb1 = PaintBallChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hc1 = HaobcConfirm_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.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_leyou()  # 输入账号,密码
         hc.submit_order_to_station_owner_button()  # 点击提交给站主
         hc.confirm_and_pay_button()  # 点击确认支付
示例#3
0
 def test_Play_mix_Pf_del_icon(self):
     """验证删除选择的全部赛事图标,支付流程"""
     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.down_bf()
         hc1.Pf_del_icon()
         hc.confirm_delete_button()
         hb.Basketball_mix_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_leyou()  # 输入账号,密码
         hc.submit_order_to_station_owner_button()  # 点击提交给站主
         hc.confirm_and_pay_button()  # 点击确认支付
示例#4
0
 def test_many_note_many_double_pause_five_case(self):
     """多注多倍,机选五注"""
     ha = HomePage_leyou(self.driver)
     hb = Arrang_there_choosenumber_leyou(self.driver)
     hb1 = UnionLottoChooseNumber_leyou(self.driver)
     hb2 = 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_three_link()  ####点击排列3
     hb.Play()  ###点击玩法
     hb.Play_Group_six()  ####点击组六
     hb.group_sixs(4)
     hb2.Confirm_nu()  # 点击确认选号
     mur1 = hc1.Test_note_nu()  ##读取注数
     self.assertEqual('4', mur1)
     hc1.Multiple_input(5)  ###点击倍数输入功能
     mur = hc1.Test_multiple_show()  ##读取倍数
     self.assertEqual('5', mur)
     hc1.Pause_five()  ###点击机选五注
     mur2 = hc1.Test_multiple_show()  ##读取倍数
     self.assertEqual('5', mur2)
     mur3 = hc1.Test_note_nu()  ##读取注数
     self.assertEqual('9', mur3)
     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()  # 点击确认支付
     mur4 = hd.assect_pay()  ##读取支付状态文本
     self.assertEqual('订单提交成功', mur4)
示例#5
0
 def test_arrany_there_Continue_switch_play_case(self):
     """,组三,继续选号,切换玩法为直选"""
     ha = HomePage_leyou(self.driver)
     hb = Arrang_there_choosenumber_leyou(self.driver)
     hb1 = Seven_color_choosenumber_leyou(self.driver)
     hb2 = 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_three_link()  ####点击排列3
     hb.Play()  ###点击玩法
     hb.Play_Group_there()  ####点击组三
     hb.group_theres(4)  ###组三,选择4个号码
     hb2.Confirm_nu()  # 点击确认选号
     hc1.Coun_nu()  ###点击继续选号
     hb.Play()  ###点击玩法
     hb.Play_Group_six()  ####点击组六
     hb.Switch_play_ok()  ##点击确定
     hb.group_sixs(3)
     hb2.Confirm_nu()  # 点击确认选号
     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_SuccessPage_continue_buy_case(self):
     '''订单详情页,点击【点击投注大乐透】,页面跳转至选号页面,选择一注,提交订单'''
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     l = Login_leyou(self.driver)
     hp.My_lottery_ticket()  # 点击我的彩票
     l.login_leyou()  # 点击登录
     sos = SubmitOrderSuccess_leyou(self.driver)
     hp.homepage_link()  # 点击首页
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_leyou(self.driver)
     blcl = BigLotteryConfirmLottery_leyou(self.driver)
     cl = ConfirmLottery_leyou(self.driver)
     od = OrderDetails_leyou(self.driver)
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     blcn.l_red_label5()  # 选择5个红球
     blcn.l_bule_label2()  # 选择2个蓝球
     ulcn.Confirm_button()  # 点击确认选号按钮
     mu1 = cl.Select_number()  # 读取投注确认页所选号码
     cl.submit_order_to_station_owner_button()  # 提交订单给站主按钮
     cl.confirm_and_pay_button()  # 点击确认支付
     sos.Continue_buy()  #点击继续购买此彩种
     blcn.l_red_label5()  # 选择5个红球
     blcn.l_bule_label2()  # 选择2个蓝球
     ulcn.Confirm_button()  # 点击确认选号按钮
 def test_Lottery_Hand_r19_case(self):
     '''大乐透选取19个红球,第19个红球提示“红球不能超过18个”测试'''
     ###点击进入大乐透选号页面###
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_leyou(self.driver)
     blcn.l_red_label19()  # 选取19个红球
     text = blcn.out_of_num()  #获取超过18个红球时的toast提示信息
     self.assertIn("红球不能超过18个", text)
     blcn.l_bule_label2()  #选取2个蓝球
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.Confirm_button()  # 点击确认选号按钮
     cl = ConfirmLottery_leyou(self.driver)
     cl.submit_order_to_station_owner_button()  # 提交订单给站主
     l = Login_leyou(self.driver)  #####用户登录######
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_leyou()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_leyou(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
示例#8
0
 def test_many_note_many_double_case(self):
     """多注多倍"""
     ha = HomePage_leyou(self.driver)
     hb = Arrang_there_choosenumber_leyou(self.driver)
     hb1 = UnionLottoChooseNumber_leyou(self.driver)
     hb2 = 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_three_link()  ####点击排列3
     hb.Play()  ###点击玩法
     hb.Play_Direct()  ####点击直选
     hb.there_bais(2)  # 随机选取百位去个数字
     hb.there_shis(2)  # 随机选取十位1个数字
     hb.there_ges(2)  # 随机选择个位1个数字
     hb2.Confirm_nu()  # 点击确认选号
     hc1.Multiple_input(5)  ###点击倍数输入功能
     mur = hc1.Test_multiple_show()  ##读取倍数
     self.assertEqual('5', mur)
     mur1 = hc1.Test_note_nu()  ##读取注数
     self.assertEqual('8', 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()  # 点击确认支付
     mur2 = hd.assect_pay()  ##读取支付状态文本
     self.assertEqual('订单提交成功', mur2)
 def test_fivestar_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.five_star()  # 选择五星
     ssc_cn.wanwei_all()
     ssc_cn.qianwei_all()
     ssc_cn.baiwei_all()
     self.driver.execute_script("window.scroll(0,300)")
     ssc_cn.shiwei_all()
     ssc_cn.gewei_all()
     aa = efcn.total_buy_text()
     self.assertIn("100000注 ", aa)
     self.driver.execute_script("window.scroll(0,0)")
     ssc_cn.wanwei_all()
     ssc_cn.qianwei_all()
     ssc_cn.baiwei_all()
     self.driver.execute_script("window.scroll(0,300)")
     ssc_cn.shiwei_all()
     ssc_cn.gewei_all()
     aa = efcn.total_buy_text()
     self.assertIn("请每位至少选择1个号码", aa)
示例#10
0
 def test_Direct_Multiple_add_case(self):
     """验证确认投注页面,点击倍数+"""
     ha = HomePage_leyou(self.driver)
     hb = Arrang_there_choosenumber_leyou(self.driver)
     hb1 = UnionLottoChooseNumber_leyou(self.driver)
     hb2 = ArrangeFiveChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hd = ArrangeFiveConfirmLottery_leyou(self.driver)
     hl = Login_leyou(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.rank_three_link()  ####点击排列3
     hb.Play()  ###点击玩法
     hb.Play_Direct()  ####点击直选
     hb.there_bais(1)  # 随机选取百位去个数字
     hb.there_shis(1)  # 随机选取十位1个数字
     hb.there_ges(1)  # 随机选择个位1个数字
     hb2.Confirm_nu()  # 点击确认选号
     hd.Multiple_add()  ##点击倍数 +号
     mur = hd.Test_multiple_show()  # 读取倍数
     self.assertEqual('2', mur)  ##断言
     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()  # 点击确认支付
示例#11
0
 def test_Direct_chase_ticket_fifty_case(self):
     """"点击追加50期"""
     ha = HomePage_leyou(self.driver)
     hb = Arrang_there_choosenumber_leyou(self.driver)
     hb1 = UnionLottoChooseNumber_leyou(self.driver)
     hb2 = ArrangeFiveChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hd = ArrangeFiveConfirmLottery_leyou(self.driver)
     hl = Login_leyou(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.rank_three_link()  ####点击排列3
     hb.Play()  ###点击玩法
     hb.Play_Direct()  ####点击直选
     hb.there_bais(1)  # 随机选取百位去个数字
     hb.there_shis(1)  # 随机选取十位1个数字
     hb.there_ges(1)  # 随机选择个位1个数字
     hb2.Confirm_nu()  # 点击确认选号
     hc.chase_ticket_button()  ###点击追期
     hc.chase_ticket_button_fifty()  ##点击 50期
     nu = hd.Test_period_show()
     self.assertEqual('50', nu)
     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()  # 点击确认支付
示例#12
0
 def test_Direct_iagree_case(self):
     """验证确认投注页面,'点击我已满18岁单选按钮"""
     ha = HomePage_leyou(self.driver)
     hb = Arrang_there_choosenumber_leyou(self.driver)
     hb1 = UnionLottoChooseNumber_leyou(self.driver)
     hb2 = ArrangeFiveChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hd = ArrangeFiveConfirmLottery_leyou(self.driver)
     hl = Login_leyou(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.rank_three_link()  ####点击排列3
     hb.Play()  ###点击玩法
     hb.Play_Direct()  ####点击直选
     hb.there_bais(1)  # 随机选取百位去个数字
     hb.there_shis(1)  # 随机选取十位1个数字
     hb.there_ges(1)  # 随机选择个位1个数字
     hb2.Confirm_nu()  # 点击确认选号
     hd.Iagree()  # 点击我已满18岁单选按钮
     hc.submit_order_to_station_owner_button()  # 点击提交给站主
     hd.Know()  # 点击我知道了
     hd.Iagree()  # 点击我已满18岁单选按钮
     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()  # 点击确认支付
示例#13
0
 def test_Direct_alter_nu_case(self):
     """验证确认投注页面,点击选择号码进行修改"""
     ha = HomePage_leyou(self.driver)
     hb = Arrang_there_choosenumber_leyou(self.driver)
     hb1 = UnionLottoChooseNumber_leyou(self.driver)
     hb2 = ArrangeFiveChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hd = ArrangeFiveConfirmLottery_leyou(self.driver)
     hl = Login_leyou(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.rank_three_link()  ####点击排列3
     hb.Play()  ###点击玩法
     hb.Play_Direct()  ####点击直选
     hb1.machine_choose_button()  ###点击机选
     hb1.machine_choose_five_button()  ##点击机选5注
     hd.Note_none(2)
     mur = hd.Test_note_nu()
     self.assertEqual('13', mur)  ####断言注数
     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()  # 点击确认支付
示例#14
0
 def test_Direct_Del_all_nu_case(self):
     """验证确认投注页面,点击删除选号图标功能"""
     ha = HomePage_leyou(self.driver)
     hb = Arrang_there_choosenumber_leyou(self.driver)
     hb1 = UnionLottoChooseNumber_leyou(self.driver)
     hb2 = ArrangeFiveChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hd = ArrangeFiveConfirmLottery_leyou(self.driver)
     hl = Login_leyou(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.rank_three_link()  ####点击排列3
     hb.Play()  ###点击玩法
     hb.Play_Direct()  ####点击直选
     hb1.machine_choose_button()  ###点击机选
     hb1.machine_choose_ten_button()  ##点击机选10注
     hc.delete_all_num_button()  ###点击清除所有选号
     hc.cancel_delete_button()  # 点击取消
     hc.delete_all_num_button()
     hc.confirm_delete_button()  # 点击确定
     hb1.machine_choose_button()  ###点击机选
     hb1.machine_choose_one_button()  ##点击机选一注
     hb2.Confirm_nu()  # 点击确认选号
     mur = hd.Test_note_nu()
     self.assertEqual('1', mur)  ####断言注数
     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_Lottery_Hand_r5b12_case(self):
     """大乐透手选5个红球12个蓝球购买流程测试"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_leyou(self.driver)
     blcn.l_red_label5()  # 任意选择5个红球
     blcn.l_bule_label12()  # 任意选择12个蓝球
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.Confirm_button()  # 点击确认选号按钮
     cl = ConfirmLottery_leyou(self.driver)
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     #####用户登录######
     l = Login_leyou(self.driver)
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_leyou()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_leyou(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
 def test_fivestar_choose_double_case(self):
     '''五星直选玩法,每位各选多个号码并提交订单流程测试'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     l = Login_leyou(self.driver)
     efcn = ElevenFiveChooseNumber_leyou(self.driver)
     efcl = EleChooseFiveConfirmLottery_leyou(self.driver)
     cl = ConfirmLottery_leyou(self.driver)
     sos = SubmitOrderSuccess_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.five_star()  # 选择五星
     ssc_cn.wanwei_random(2)
     ssc_cn.qianwei_random(2)
     ssc_cn.baiwei_random(2)
     self.driver.execute_script("window.scroll(0,300)")
     ssc_cn.shiwei_random(2)
     ssc_cn.gewei_random(2)
     aa = efcn.total_buy_text()
     self.assertIn("32注 ", aa)
     efcn.confirm_number_button()  # 点击确认选号
     efcl.submit_order_button()  # 点击提交订单给站主
     cl.confirm_and_pay_button()  # 点击确认并支付
     hp.Moveable_float_close()  # 如果出现浮层弹框,关闭
     text = sos.submit_order_success()  # 获取页面“订单提交成功”文本
     self.assertEqual("订单提交成功", text)
     hp.Moveable_float_close()  # 如果出现浮层弹框,关闭
     trade_name = sos.trade_name_text()  # 获取页面商品名称文本
     self.assertIn("商品名称:乐优炫彩-重庆时时彩", trade_name)
 def test_LotteryOderDetails_continue_buy_case(self):
     '''提交订单成功页,点击【继续购买该方案】,页面跳转至投注确认页'''
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     l = Login_leyou(self.driver)
     hp.My_lottery_ticket()  # 点击我的彩票
     l.login_leyou()  # 点击登录
     sos = SubmitOrderSuccess_leyou(self.driver)
     hp.homepage_link()  # 点击首页
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_leyou(self.driver)
     blcl = BigLotteryConfirmLottery_leyou(self.driver)
     cl = ConfirmLottery_leyou(self.driver)
     od = OrderDetails_leyou(self.driver)
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     blcn.l_red_label5()  #选择5个红球
     blcn.l_bule_label2()  #选择2个蓝球
     ulcn.Confirm_button()  # 点击确认选号按钮
     mu1 = cl.Select_number()  #读取投注确认页所选号码
     cl.submit_order_to_station_owner_button()  #提交订单给站主按钮
     cl.confirm_and_pay_button()  #点击确认支付
     sos.check_order_details()  #点击查看订单详情
     mu2 = od.Betting_nu()  #读取订单详情页号码
     self.assertEqual(mu1, mu2, '订单详情页显示有误')
     od.Scheme()  #点击继续购买此方案
     mur = cl.confirm_num_page_text()
     self.assertEqual('提交订单给站主', mur)
 def test_fivestar_choose_all_case(self):
     '''五星直选玩法,每位各选所有号码'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     l = Login_leyou(self.driver)
     efcn = ElevenFiveChooseNumber_leyou(self.driver)
     efcl = EleChooseFiveConfirmLottery_leyou(self.driver)
     cl = ConfirmLottery_leyou(self.driver)
     sos = SubmitOrderSuccess_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.five_star()  # 选择五星
     ssc_cn.wanwei_all()
     ssc_cn.qianwei_all()
     ssc_cn.baiwei_all()
     self.driver.execute_script("window.scroll(0,300)")
     ssc_cn.shiwei_all()
     ssc_cn.gewei_all()
     aa = efcn.total_buy_text()
     self.assertIn("100000注 ", aa)
     efcn.confirm_number_button()  # 点击确认选号
     efcl.submit_order_button()  # 点击提交订单给站主
     cl.confirm_and_pay_button()  # 点击确认并支付
     toast = cl.out_max_pay()
     self.assertEqual("投注金额不能大于100000元", toast)
 def test_many_lottery_ckick_x_once_case(self):
     '''在投注确认页面,多注号码,点击左边X按钮,投注号码减少一注'''
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     l = Login_leyou(self.driver)
     hp.My_lottery_ticket()  # 点击我的彩票
     l.login_leyou()  # 点击登录
     sos = SubmitOrderSuccess_leyou(self.driver)
     hp.homepage_link()  # 点击首页
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_leyou(self.driver)
     blcl = BigLotteryConfirmLottery_leyou(self.driver)
     cl = ConfirmLottery_leyou(self.driver)
     od = OrderDetails_leyou(self.driver)
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.machine_choose_button()  #点击机选按钮
     ulcn.machine_choose_five_button()  #点击机选5注
     sleep(5)
     num = cl.event_count()  # 获取总共有多少注
     cl.Del_x()  #点击单个删除x
     num1 = cl.lottery_number_text()  # 获取注数
     self.assertIn("4", num1)
     cl.submit_order_to_station_owner_button()  # 点击提交订单给站主
     cl.confirm_and_pay_button()  # 点击确认并支付
     hp.Moveable_float_close()  # 如果出现浮层弹框,关闭
     text = sos.submit_order_success()  # 获取页面“订单提交成功”文本
     self.assertEqual("订单提交成功", text)
     hp.Moveable_float_close()  # 如果出现浮层弹框,关闭
     trade_name = sos.trade_name_text()  # 获取页面商品名称文本
     self.assertIn("商品名称:乐优炫彩-大乐透", trade_name)
 def test_Lottery_Hand_r18b16_case(self):
     '''大乐透选取18个红球,12个蓝球提示“投注金额不能大于100000元”测试'''
     ###点击进入大乐透选号页面###
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_leyou(self.driver)
     blcn.l_red_label18()  # 选取18个红球
     blcn.l_bule_label12()  #选取12个蓝球
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.Confirm_button()  # 点击确认选号按钮
     cl = ConfirmLottery_leyou(self.driver)
     cl.submit_order_to_station_owner_button()  # 提交订单给站主
     l = Login_leyou(self.driver)  #####用户登录######
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_leyou()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  #点击确认并支付按钮
     text = cl.out_max_pay()  #获取超额提示信息文本
     self.assertIn("投注金额不能大于100000元", text)
     cl.re_selection_num()  #点击重新选号链接
     blcn.l_bule_label12()  #取消选中的12个蓝球
     blcn.l_bule_label2()  #选取2个蓝球
     ulcn.Confirm_button()  #点击确认选号
     sleep(2)  #系统限制,操作订单不能过于频繁
     cl.submit_order_to_station_owner_button()  #提交订单给站主
     cl.confirm_and_pay_button()  #确认支付
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_leyou(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
示例#21
0
 def test_group_six_clear_number_case(self):
     """验证选号页面,点击清除选号按钮功能"""
     ha = HomePage_leyou(self.driver)
     hb = Arrang_there_choosenumber_leyou(self.driver)
     hb1 = ArrangeFiveChooseNumber_leyou(self.driver)
     hb2 = UnionLottoChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hd = ArrangeFiveConfirmLottery_leyou(self.driver)
     hl = Login_leyou(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.rank_three_link()  ####点击排列3
     hb.Play()  ###点击玩法
     hb.Play_Group_six()  ####点击组六
     hb.group_sixs(4)
     hb2.clear_number()  #点击清除选号页面
     hb1.Confirm_nu()  # 点击确认选号
     hb1.Confirm_nu()  # 点击确认选号
     mur = hd.Test_note_nu()
     self.assertEqual('1', mur)  ####断言注数
     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_Lottery_re_r18b1_case(self):
     '''大乐透重复选号取消选中测试'''
     ###点击进入大乐透选号页面###
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_leyou(self.driver)
     blcn.l_rechoose_red_label18()  #随机选中18个红球,再取消选中的红球
     blcn.l_red_label18()  #重新选取18个红球
     blcn.l_bule_label2()  #选取2个蓝球
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.Confirm_button()  #点击确认选号按钮
     cl = ConfirmLottery_leyou(self.driver)
     cl.submit_order_to_station_owner_button()  # 提交订单给站主
     l = Login_leyou(self.driver)  #####用户登录######
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_leyou()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击确认并支付按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_leyou(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
示例#23
0
 def test_a_note_del_case(self):
     """单注号码,点击X按钮"""
     ha = HomePage_leyou(self.driver)
     hb = Arrang_there_choosenumber_leyou(self.driver)
     hb1 = UnionLottoChooseNumber_leyou(self.driver)
     hb2 = 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_three_link()  ####点击排列3
     hb.Play()  ###点击玩法
     hb.Play_Group_six()  ####点击组六
     hb.group_sixs(3)
     hb2.Confirm_nu()  # 点击确认选号
     mur1 = hc1.Test_note_nu()  ##读取注数
     self.assertEqual('1', 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()  # 点击确认支付
     mur2 = hd.assect_pay()  ##读取支付状态文本
     self.assertEqual('订单提交成功', mur2)
 def test_Lottery_Hand_choose_single_chase_throws_case(self):
     """手动选号,单式,多注多倍,提交订单"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  #点击大乐透链接
     blcn = BigLotteryChooseNum_leyou(self.driver)
     blcl = BigLotteryConfirmLottery_leyou(self.driver)
     cl = ConfirmLottery_leyou(self.driver)
     blcn.l_red_label5()  #任意选择5个红球
     blcn.l_bule_label2()  #任意选择2个蓝球
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.Confirm_button()  #点击确认选号按钮
     cl.chase_ticket_button()  # 点击追xx期
     blcl.additional_radio_button()  # 点击追加单选按钮
     cl.chase_ticket_button_two()  # 点击追加2期单选按钮
     cl.throw_times_input(3)  # 输入投注倍数
     num1 = cl.lottery_number_text()  #获取注数
     chase = cl.chase_time_text()  #获取追号期数
     times = cl.throw_time_text()  #获取倍数
     self.assertEqual("123", num1 + chase + times)
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     #####用户登录######
     l = Login_leyou(self.driver)
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_leyou()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_leyou(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
示例#25
0
 def test_Direct_add_all_choosenumber(self):
     """验证选号页面,数字球功能"""
     ha = HomePage_leyou(self.driver)
     hb = There_D_choosenumber_leyou(self.driver)
     hb1 = ArrangeFiveChooseNumber_leyou(self.driver)
     hb2 = UnionLottoChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hd = ArrangeFiveConfirmLottery_leyou(self.driver)
     hl = Login_leyou(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.fucai_3D_link()  ###点击3D
     hb.Play_d()  ###点击玩法
     hb.Play_group_direct_add_d()  ##点击直选和值
     hb.Direct_add(28)  ###点击27个数字球
     hb.Direct_add(28)  ###取消27个数字球
     nu = hb.Direct_addA()  ###点击1个数字球
     hb1.Confirm_nu()  # 点击确认选号
     mur = hd.Test_note_nu()
     self.assertEqual(nu, mur)  ####断言注数
     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_Lottery_multiphase_machine_choose5_case(self):
     """选号页面,右上方隐藏的多期机选,5期提交订单"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  #点击大乐透链接
     blcn = BigLotteryChooseNum_leyou(self.driver)
     blcl = BigLotteryConfirmLottery_leyou(self.driver)
     cl = ConfirmLottery_leyou(self.driver)
     od = OrderDetails_leyou(self.driver)
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.There_clock()  #点击。。。
     ulcn.Many_pause()  #点击多期机选
     ulcn.many_machine_choose(5)  #点击5期
     text1 = ulcn.many_machine_choose_text()
     self.assertIn("1注 5期 1倍", text1, '多期机选有误')
     ulcn.Many_pause_confirm()  #点击多期机选页的【提交订单】
     #####用户登录######
     l = Login_leyou(self.driver)
     l.login_leyou()
     ulcn.There_clock()  # 点击。。。
     ulcn.Many_pause()  # 点击多期机选
     ulcn.many_machine_choose(5)  # 点击5期
     ulcn.Many_pause_confirm()  # 点击多期机选页的【提交订单】
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_leyou(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
示例#27
0
 def test_Play_mix_N_del(self):
     """验证删除赛事X按钮,支付流程"""
     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场比赛
         a = hc1.A_nn()  ###读取删除前有多少个X按钮
         hc1.Del_n(1)  ##点击第1场赛事的X按钮
         a1 = hc1.A_nn()  ###读取删除后有多少个X按钮
         self.assertEqual(a - 1, a1)
         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_Lottery_multiphase_machine_single_radio_case(self):
     """选号页面,右上方隐藏的多期机选,点击追加单选按钮,提交订单"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     l = Login_leyou(self.driver)
     hp.My_lottery_ticket()  # 点击我的彩票
     l.login_leyou()  # 点击登录
     hp.homepage_link()  # 点击首页
     hp.Moveable_float_close()
     hp.Lottery_link()  #点击大乐透链接
     blcn = BigLotteryChooseNum_leyou(self.driver)
     blcl = BigLotteryConfirmLottery_leyou(self.driver)
     cl = ConfirmLottery_leyou(self.driver)
     od = OrderDetails_leyou(self.driver)
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.There_clock()  #点击。。。
     ulcn.Many_pause()  #点击多期机选
     ulcn.many_chase_radio()  #点击多期机选的单选按钮
     text1 = ulcn.many_machine_choose_text()
     ulcn.Many_pause_confirm()  #点击多期机选页的【提交订单】
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_leyou(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
示例#29
0
 def test_Play_mix_Btn_less(self):
     """验证修改倍数 - 功能,支付流程"""
     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(3)  #####修改倍数为3
         hc1.Btn_less()  ####点击倍数-
         mul = hc1.Times_display()  ###获取倍数
         self.assertEqual('2', 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()  # 点击确认支付
示例#30
0
 def test_Pause_five_case(self):
     '''验证手选号码,点击机选5注,支付流程'''
     ha = HomePage_leyou(self.driver)
     hb = ArrangeFiveChooseNumber_leyou(self.driver)
     hb1 = UnionLottoChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hl = Login_leyou(self.driver)
     hd = ArrangeFiveConfirmLottery_leyou(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.rank_five_link()  ###点击排列5
     hb.Afive_nuws(1)  # 随机选择1个万位号码
     hb.Afive_nuqs(1)  # 随机选择1个千位号码
     hb.Afive_nubs(1)  # 随机选择1个百位号码
     hb.Afive_down()  # 鼠标向下
     hb.Afive_nuss(1)  # 随机选择1个十位号码
     hb.Afive_nugs(1)  # 随机选择1个个位号码
     hb.Confirm_nu()  # 点击确认选号按钮
     hd.Pause_five() # 点击机选5注
     mur = hd.Test_note_nu()
     self.assertEqual('6', mur)  ####断言注数
     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()  # 点击确认支付