def test_option14_choose_out_case(self):
     '''广西11选5普通玩法,乐选四玩法,选取5个号码,提示“只支持单式投注”流程测试'''
     hp = HomePage(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gx_11_5_link()  # 点击广西11选5链接
     efcn = ElevenFiveChooseNumber(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(24, 14)  # 选择广西11选5普通模式乐选四玩法
     efcn.hand_options(5)  # 选取5个号码
     toast = ulcn.out_of_num()  # 获取toast提示信息
     self.assertEqual("只支持单注投注", toast)
예제 #2
0
 def test_options10_hand_choose11_11_case(self):
     '''广东11选5,前二直选玩法,前两位各选11个号码流程测试'''
     hp = HomePage(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gd_11_5_link()  # 点击广东11选5链接
     efcn = ElevenFiveChooseNumber(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(23, 9)  # 广东11选5前二直选
     efcn.hand_options(11)  #第一位选取11个号码
     efcn.second_num_choose(11)  #第二位选取11个号码
     efcn.confirm_number_button()  # 点击确认选号
 def test_dantuo_option2_choose_out_case(self):
     '''广西11选5胆拖玩法,任选二玩法,2个胆码,提示“胆码个数超过限制”流程测试'''
     hp = HomePage(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gx_11_5_link()  # 点击广西11选5链接
     efcn = ElevenFiveChooseNumber(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(24, 16)  # 选择广西11选5胆拖模式任选二玩法
     efcn.hand_options(2)  # 选取2个胆码
     toast = ulcn.out_of_num()  # 获取toast提示信息
     self.assertEqual("胆码个数超过限制!", toast)
 def test_dantuo_option3_choose_2_2_case(self):
     '''广西11选5胆拖玩法,任选三玩法,2个胆码,2个拖码流程测试'''
     hp = HomePage(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gx_11_5_link()  # 点击广西11选5链接
     efcn = ElevenFiveChooseNumber(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(24, 17)  # 选择广西11选5胆拖模式任选三玩法
     efcn.dantuo_choose_num(2, 2)  # 选取2个胆码2个拖码
     total = efcn.total_buy_text()  # 获取注数文本
     self.assertIn("2", total)  # 检查2注
     efcn.confirm_number_button()  # 点击确认选号
 def test_dantuo_option4_choose_1_4_case(self):
     '''广东11选5胆拖玩法,任选四玩法,1个胆码,4个拖码流程测试'''
     hp = HomePage(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gd_11_5_link()  # 点击广东11选5链接
     efcn = ElevenFiveChooseNumber(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(23, 18)  # 选择广东11选5胆拖模式任选四玩法
     efcn.dantuo_choose_num(1, 4)  # 选取1个胆码4个拖码
     total = efcn.total_buy_text()  # 获取注数文本
     self.assertIn("4", total)  # 检查4注
     efcn.confirm_number_button()  # 点击确认选号
예제 #6
0
 def test_option12_hand_choose1_1_1_case(self):
     '''广西11选5,前三直选玩法,前三位各选一个号码测试流程'''
     hp = HomePage(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gx_11_5_link()  # 点击广西11选5链接
     efcn = ElevenFiveChooseNumber(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(24, 11)  # 广西11选5前三直选
     efcn.hand_options(1)  # 第一位选取1个号码
     efcn.second_num_choose(1)  # 第二位选取1个号码
     efcn.third_num_choose(1)#第三位选取1个号码
     efcn.confirm_number_button()  # 点击确认选号
 def test_dantuo_front3_choose_1_3_case(self):
     '''广西11选5胆拖玩法,前三组选玩法,1个胆码,3个拖码流程测试'''
     hp = HomePage(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gx_11_5_link()  # 点击广西11选5链接
     efcn = ElevenFiveChooseNumber(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(24, 23)  #选择广西11选5胆拖模式前三组选玩法
     sleep(2)
     efcn.dantuo_choose_num(1, 3)  #选取1个胆码3个拖码
     total = efcn.total_buy_text()  # 获取注数文本
     self.assertIn("3", total)  # 检查3注
     efcn.confirm_number_button()  #点击确认选号
예제 #8
0
 def test_options2_hand_choose3_case(self):
     '''广西11选5,任选二玩法,手选三个号流程测试'''
     hp = HomePage(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gx_11_5_link()  # 点击广西11选5链接
     efcn = ElevenFiveChooseNumber(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(24, 1)  # 广西11选5任选二
     efcn.hand_options(3)  # 任选三个号
     efcn.confirm_number_button()  # 点击确认选号
     ecfcl = EleChooseFiveConfirmLottery(self.driver)
     ecfcl.chase_ticket_input("3")  # 输入追3期
     ecfcl.throw_times_input("3")  # 输入投3倍
 def test_danyuo_many_lottery_and_times_case(self):
     '''胆拖投注,在投注确认页面增加倍数和期数,提交订单'''
     hp = HomePage(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gx_11_5_link()  # 点击广西11选5链接
     efcn = ElevenFiveChooseNumber(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(24, 16)  # 选择广西11选5胆拖模式任选二玩法
     efcn.dantuo_choose_num(1, 2)  # 选取1个胆码2个拖码
     total = efcn.total_buy_text()  # 获取注数文本
     self.assertIn("2", total)  # 检查2注
     efcn.confirm_number_button()  # 点击确认选号
     ecfcl = EleChooseFiveConfirmLottery(self.driver)
     ecfcl.chase_ticket_input("3")  # 输入追3期
     ecfcl.throw_times_input("3")  # 输入投3倍
예제 #10
0
 def test_delete_num_case(self):
     '''验证选号页的清除按钮,测试流程'''
     hp = HomePage(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gd_11_5_link()  # 点击广东11选5链接
     efcn = ElevenFiveChooseNumber(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(23, 1)  # 广东11选5任选二
     label = efcn.hand_options(2)
     ulcn.clear_number()  #点击清除选号按钮
     label2 = efcn.hand_options(2)
     if label != label2:
         print("清除选号成功")
     else:
         print("清除选号失败")
     efcn.confirm_number_button()  # 点击确认选号
예제 #11
0
 def test_machine_choose_one_delete_all_case(self):
     '''机选一注,投注确认页点击删除所有选号并确认按钮流程测试'''
     hp = HomePage(self.driver)
     cl = ConfirmLottery(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gd_11_5_link()  # 点击广东11选5链接
     efcn = ElevenFiveChooseNumber(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     ulcn.machine_choose_button()  #点击机选
     ulcn.machine_choose_one_button()  #机选一注
     efcn.confirm_number_button()  #确认选号
     ecfcl = EleChooseFiveConfirmLottery(self.driver)
     ecfcl.countdown_text()  # 检查倒计时文案
     check = ecfcl.lottery_chase_throw_text()
     self.assertIn("1注1期1倍", check)
     cl.delete_all_num_button()  #点击删除所有选号
     cl.confirm_delete_button()  #点击确认删除所有选号
     ulcn.machine_choose_button()  # 点击机选
     ulcn.machine_choose_one_button()  # 机选一注
     efcn.confirm_number_button()  # 确认选号
     recheck = ecfcl.lottery_chase_throw_text()
     self.assertIn("1注1期1倍", recheck)
     ecfcl.submit_order_button()  # 提交订单给站主
     l = Login(self.driver)
     l.login()  # 登录
     ecfcl.submit_order_button()  # 提交订单给站主
     cl.confirm_and_pay_button()  # 点击确认并支付
     sos = SubmitOrderSuccess(self.driver)
     hp.Moveable_float_close()  # 如果出现浮层弹框,关闭
     text = sos.submit_order_success()  # 获取页面“订单提交成功”文本
     self.assertEqual("订单提交成功", text)
     hp.Moveable_float_close()  # 如果出现浮层弹框,关闭
     trade_name = sos.trade_name_text()  # 获取页面商品名称文本
     self.assertIn("商品名称:乐米彩票-粤11选5", trade_name)
     sos.check_order_details()  # 点击查看详情
     od = OrderDetails(self.driver)
     od.order_details_check()  # 检查订单详情页页面元素
예제 #12
0
 def test_option13_choose_out_case(self):
     '''广东11选5普通玩法,乐选三玩法,每一位各选2个号码,提示“只支持单式投注”流程测试'''
     hp = HomePage(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gd_11_5_link()  # 点击广东11选5链接
     efcn = ElevenFiveChooseNumber(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(23, 13)  # 选择广东11选5普通模式乐选三玩法
     efcn.lexuan_choose(2, 1)  # 第一位选取2个号码
     toast = ulcn.out_of_num()  # 获取toast提示信息
     self.assertEqual("只支持单注投注", toast)
     efcn.lexuan_choose(2, 2)  # 第二位选取2个号码
     toast = ulcn.out_of_num()  # 获取toast提示信息
     self.assertEqual("只支持单注投注", toast)
     js = "window.scroll(0,300)"
     self.driver.execute_script(js)
     efcn.lexuan_choose(2, 3)  # 第三位选取2个号码
     toast = ulcn.out_of_num()  # 获取toast提示信息
     self.assertEqual("只支持单注投注", toast)
예제 #13
0
 def test_machine_choose_continue_button_case(self):
     '''投注确认页“继续选号”按钮测试流程'''
     hp = HomePage(self.driver)
     ulcn = UnionLottoChooseNumber(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.sd_11_5_link()  # 点击山东11选5链接
     efcn = ElevenFiveChooseNumber(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     ulcn.machine_choose_button()  # 点击机选
     ulcn.machine_choose_one_button()  # 机选一注
     efcn.confirm_number_button()  # 确认选号
     ecfcl = EleChooseFiveConfirmLottery(self.driver)
     ecfcl.countdown_text()  # 检查倒计时文案
     ecfcl.continue_choose_num()  # 点击“继续选号”按钮
     ulcn.machine_choose_button()  # 点击机选
     ulcn.machine_choose_one_button()  # 机选一注
     efcn.confirm_number_button()  # 确认选号
     check = ecfcl.lottery_chase_throw_text()  # 获取投注注数、追号期数、投注倍数
     self.assertIn("2注1期1倍", check)  ##验证投注注数、投注期号、投注倍数
     ecfcl.submit_order_button()  # 提交订单给站主
     l = Login(self.driver)
     l.login()  # 登录
     ecfcl.submit_order_button()  # 提交订单给站主
     cl = ConfirmLottery(self.driver)
     cl.confirm_and_pay_button()  # 点击确认并支付
     sos = SubmitOrderSuccess(self.driver)
     text = sos.submit_order_success()  # 获取页面“订单提交成功”文本
     self.assertEqual("订单提交成功", text)
     hp.Moveable_float_close()  # 如果出现浮层弹框,关闭
     trade_name = sos.trade_name_text()  # 获取页面商品名称文本
     self.assertIn("商品名称:乐米彩票-山东11选5", trade_name)
     sos.check_order_details()  # 点击查看详情
     od = OrderDetails(self.driver)
     od.order_details_check()  # 检查订单详情页页面元素
예제 #14
0
 def test_double_cancel_case(self):
     '''验证点击两次号码取消选号,流程测试'''
     hp = HomePage(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gd_11_5_link()  # 点击广东11选5链接
     efcn = ElevenFiveChooseNumber(self.driver)
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(23, 1)  #广东11选5任选二
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     lable1 = efcn.hand_options(11)
     total_buy_text = efcn.total_buy_text()
     self.assertIn("55注 ", total_buy_text)
     efcn.hand_options(11)
     total_buy_text = efcn.total_buy_text()
     self.assertIn("请至少选择", total_buy_text)
     lable2 = efcn.hand_options(2)  #任选两个球
     if lable1 != lable2:
         print("双击取消选号成功")
     else:
         print("双击取消选号失败")
     efcn.confirm_number_button()  #确认选号