Example #1
0
 def test_threestar_choose_one_clear_num(self):
     '''选择一个号码,点击【清除所有选号】,重新选择一个号码,提交订单'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     l = Login_leyou(self.driver)
     efcn = ElevenFiveChooseNumber_leyou(self.driver)
     ulcn = UnionLottoChooseNumber_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.three_star()  # 选择三星
     ssc_cn.baiwei_random(1)
     ssc_cn.shiwei_random(1)
     ssc_cn.gewei_random(1)
     aa = efcn.total_buy_text()
     self.assertIn("1注 ", aa)
     ulcn.clear_number()  #清除所有选号
     cc = efcn.total_buy_text()
     self.assertIn("请每位至少选择1个号码", cc)
     ssc_cn.baiwei_random(2)
     ssc_cn.shiwei_random(2)
     ssc_cn.gewei_random(2)
     bb = efcn.total_buy_text()
     self.assertIn("8注 ", bb)
     efcn.confirm_number_button()  # 点击确认选号
     bb = efcl.lottery_chase_throw_text()  # 获取注数倍数
     self.assertIn("8注1期1倍", bb)
     efcl.submit_order_button()  # 点击提交订单给站主
     cl.confirm_and_pay_button()  # 点击确认并支付
     hp.Moveable_float_close()  # 如果出现浮层弹框,关闭
     text = sos.submit_order_success()  # 获取页面“订单提交成功”文本
     self.assertEqual("订单提交成功", text)
     trade_name = sos.trade_name_text()  # 获取页面商品名称文本
     self.assertIn("商品名称:乐优炫彩-重庆时时彩", trade_name)
Example #2
0
 def test_coun_nu_case(self):
     '''确认页点击继续选号,支付流程'''
     ha = HomePage_leyou(self.driver)
     hb = Seven_color_choosenumber_leyou(self.driver)
     hb2 = ArrangeFiveChooseNumber_leyou(self.driver)
     hb1 = UnionLottoChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hc1 = ArrangeFiveConfirmLottery_leyou(self.driver)
     hl = Login_leyou(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.colorful_star_link()  # 点击七星彩
     hb.Seven_nuos(1)  # 在一位随机点击1个数字
     hb.Seven_nuts(1)  # 在二位随机点击1个数字
     hb.Seven_nuths(1)  # 在三位随机点击1个数字
     hb.Seven_nufs(1)  ##在四位随机点击1个数字
     hb.Seven_nufis(1)  # 在五位随机点击1个数字
     hb.Seven_nuss(1)  # 在六位随机点击1个数字
     hb.Seven_nuses(1)  # 在七位随机点击1个数字
     hb2.Confirm_nu()  ####点击确认选号
     hc1.Coun_nu()  ###点击继续选号
     hb1.machine_choose_button()  #####点击机选按钮
     hb1.machine_choose_one_button()  ####点击机选1注
     hb2.Confirm_nu()  # 点击确认选号按钮
     mur = hc1.Test_note_nu()
     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()  # 点击确认支付
Example #3
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()  # 点击确认支付
Example #4
0
 def test_Coun_nu_case(self):
     '''验证手选号码,点击继续选号,支付流程'''
     ha = HomePage_leyou(self.driver)
     hb = ArrangeFiveChooseNumber_leyou(self.driver)
     hb1 =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_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.Coun_nu()  #点击继续选号
     hb1.machine_choose_button()  #####点击机选按钮
     hb1.machine_choose_one_button()  ####点击机选1注
     hb.Confirm_nu()  # 点击确认选号按钮
     mur = hd.Test_note_nu()
     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()  # 点击确认支付
Example #5
0
 def test_Lottery_Machine_Choose_ten_case(self):
     '''大乐透机选10注,追加10期测试'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     hp.Moveable_float_close()  # 关闭悬浮窗口
     hp.Lottery_link()  # 点击大乐透链接
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.machine_choose_button()  # 点击机选按钮
     ulcn.machine_choose_ten_button()  # 点击机选5注
     cl = ConfirmLottery_leyou(self.driver)
     blcl = BigLotteryConfirmLottery_leyou(self.driver)
     cl.chase_ticket_button()  # 点击追xx期
     blcl.additional_radio_button()  # 点击追加单选按钮
     cl.chase_ticket_button_ten()  # 点击追加10期单选按钮
     blcl.l_throw_times_button_sub(3)  #输入投注倍数,点击“-”按钮
     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, "提交订单失败")
     # 返回首页
     sos.return_home()
Example #6
0
 def test_Lottery_Machine_delete_all_num_cancel(self):
     '''测试提交订单页删除所有选号按钮,取消删除'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     hp.Moveable_float_close()  # 关闭悬浮窗口
     hp.Lottery_link()  # 点击大乐透链接
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.machine_choose_button()  # 点击机选按钮
     ulcn.machine_choose_five_button()  # 点击机选5注
     cl = ConfirmLottery_leyou(self.driver)
     cl.delete_all_num_button()  # 点击删除所有选号按钮
     cl.cancel_delete_button()  # 点击取消删除按钮
     '''断言验证取消删除成功'''
     confirm_catchectic_text = cl.confirm_num_page_text()
     self.assertEqual("提交订单给站主", confirm_catchectic_text)
     print("我已放弃删除,回到了" + confirm_catchectic_text + "页")
     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_machine_choose_one_input_chase3_add_case(self):
     '''机选一注输入追3期,点击投注倍数的+按钮流程测试'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gd_11_5_link()  # 点击广东11选5链接
     efcn = ElevenFiveChooseNumber_leyou(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     ulcn.machine_choose_button()  #点击机选
     ulcn.machine_choose_one_button()  #机选一注
     efcn.confirm_number_button()  #确认选号
     ecfcl = EleChooseFiveConfirmLottery_leyou(self.driver)
     ecfcl.countdown_text()  # 检查倒计时文案
     cl = ConfirmLottery_leyou(self.driver)
     ecfcl.chase_ticket_input("3")  #输入追3期
     ecfcl.chase_add_button()  #点击投注倍数的+按钮
     check = ecfcl.lottery_chase_throw_text()  #获取投注注数、追号期数、投注倍数文本
     self.assertIn("1注4期1倍", check)
     ecfcl.submit_order_button()  # 提交订单给站主
     l = Login_leyou(self.driver)
     l.login_leyou()  # 登录
     ecfcl.submit_order_button()  # 提交订单给站主
     cl.confirm_and_pay_button()  # 点击确认并支付
     sos = SubmitOrderSuccess_leyou(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_leyou(self.driver)
     od.chase_order_details_check()  # 检查订单详情页页面元素
 def test_group_six_pause_one_case(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_six_d()  ####点击组六
     hb2.machine_choose_button()  ###点击机选
     hb2.machine_choose_one_button()  ##点击机选一注
     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_machine_choose_ten_case(self):
     '''机选10注流程测试'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gd_11_5_link()  # 点击广东11选5链接
     efcn = ElevenFiveChooseNumber_leyou(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     ulcn.machine_choose_button()  # 点击机选
     ulcn.machine_choose_ten_button()  # 机选10注
     ecfcl = EleChooseFiveConfirmLottery_leyou(self.driver)
     ecfcl.countdown_text()  # 检查倒计时文案
     ecfcl.submit_order_button()  # 提交订单给站主
     l = Login_leyou(self.driver)
     l.login_leyou()  # 登录
     ecfcl.submit_order_button()  # 提交订单给站主
     cl = ConfirmLottery_leyou(self.driver)
     cl.confirm_and_pay_button()  # 点击确认并支付
     sos = SubmitOrderSuccess_leyou(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_leyou(self.driver)
     od.order_details_checks()  # 检查订单详情页页面元素
 def test_machine_choose_one_delete_all_cancel_case(self):
     '''机选一注,投注确认页点击删除所有选号按钮并取消删除流程测试'''
     hp = HomePage_leyou(self.driver)
     cl = ConfirmLottery_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期截止:”文案是否存在
     ulcn.machine_choose_button()  # 点击机选
     ulcn.machine_choose_one_button()  # 机选一注
     efcn.confirm_number_button()  # 确认选号
     ecfcl = EleChooseFiveConfirmLottery_leyou(self.driver)
     ecfcl.countdown_text()  # 检查倒计时文案
     cl.delete_all_num_button()  # 点击删除所有选号
     cl.cancel_delete_button()  # 点击取消删除所有选号
     recheck = ecfcl.lottery_chase_throw_text()
     self.assertIn("1注1期1倍", recheck)
     ecfcl.submit_order_button()  # 提交订单给站主
     l = Login_leyou(self.driver)
     l.login_leyou()  # 登录
     ecfcl.submit_order_button()  # 提交订单给站主
     cl.confirm_and_pay_button()  # 点击确认并支付
     sos = SubmitOrderSuccess_leyou(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_leyou(self.driver)
     od.order_details_check()  # 检查订单详情页页面元素
 def test_machine_choose_five_button_case(self):
     '''投注确认页“机选五注”按钮测试流程'''
     hp = HomePage_leyou(self.driver)
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.sd_11_5_link()  # 点击山东11选5链接
     efcn = ElevenFiveChooseNumber_leyou(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     ulcn.machine_choose_button()  # 点击机选
     ulcn.machine_choose_one_button()  # 机选一注
     efcn.confirm_number_button()  # 确认选号
     ecfcl = EleChooseFiveConfirmLottery_leyou(self.driver)
     ecfcl.countdown_text()  # 检查倒计时文案
     ecfcl.machine_choose_five()  # 点击“机选5注”按钮
     check = ecfcl.lottery_chase_throw_text()  # 获取投注注数、追号期数、投注倍数
     self.assertIn("6注1期1倍", check)  ##验证投注注数、投注期号、投注倍数
     ecfcl.submit_order_button()  # 提交订单给站主
     l = Login_leyou(self.driver)
     l.login_leyou()  # 登录
     ecfcl.submit_order_button()  # 提交订单给站主
     cl = ConfirmLottery_leyou(self.driver)
     cl.confirm_and_pay_button()  # 点击确认并支付
     sos = SubmitOrderSuccess_leyou(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_leyou(self.driver)
     od.order_details_checks()  # 检查订单详情页页面元素
 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_history_double_bet_double_times_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)
     od = OrderDetails_leyou(self.driver)
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.There_clock()  #点击。。。
     ulcn.History_movements()  #点击历史走势
     ulcn.Red_movements()  #点击红球走势
     ulcn.History_red(7)  #点击7个红球
     ulcn.Bule_movements()  #点击蓝球走势
     blcn.bule_history_choose(3)  #点击3个蓝球
     ulcn.Recommended_number()  #点击【使用已选号码】
     ulcn.Confirm_button()  # 点击确认选号按钮
     blcl.additional_radio_button()  # 点击追加单选按钮
     cl.chase_ticket_input(2)  # 输入追2期
     cl.throw_times_input(3)  # 输入投注倍数
     num1 = cl.lottery_number_text()  # 获取注数
     chase = cl.chase_time_text()  # 获取追号期数
     times = cl.throw_time_text()  # 获取倍数
     self.assertEqual("6323", num1 + chase + times)
     mul1 = cl.Select_number()  #获取投注确认页投注的号码
     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, "提交订单失败")
     sos.check_order_details()  ##点击查看订单详情
     lottery2 = od.Betting_after()  ##读取显示的投注号码
     self.assertEqual(mul1, lottery2)
Example #14
0
 def test_Direct_add_Del_all_nu_ok_case(self):
     """验证确认投注页面,点击删除选号图标功能"""
     hc1 = PaintBallChooseNumber_leyou(self.driver)
     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()  ##点击直选和值
     hb2.machine_choose_button()  ###点击机选
     hb1.Confirm_nu()  # 点击确认选号
     hc.delete_all_num_button()  ###点击清除所有选号
     hc.confirm_delete_button()  # 点击确定
     mur = hc1.Play_fb()
     self.assertEqual('玩\n法', mur)
 def test_bigsmall_choose_one_clear_case(self):
     '''大小单双玩法,个位十位各选一个属性,点击【清除所有选号】图标,确认选号,提交订单'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     l = Login_leyou(self.driver)
     efcn = ElevenFiveChooseNumber_leyou(self.driver)
     efcl = EleChooseFiveConfirmLottery_leyou(self.driver)
     ulcn = UnionLottoChooseNumber_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.big_little()  # 选择大小单双
     ssc_cn.ds_shiwei_random(1)  #十位选择一个号码
     ssc_cn.ds_gewei_random(1)  #个位选择一个号码
     aa = efcn.total_buy_text()
     self.assertIn("1注 ", aa)
     ulcn.clear_number()  # 清除所有选号
     cc = efcn.total_buy_text()
     self.assertIn("请至少每位选择1种属性", cc)
     ssc_cn.ds_shiwei_random(2)  # 十位选择2个号码
     ssc_cn.ds_gewei_random(2)  # 个位选择2个号码
     cc = efcn.total_buy_text()
     self.assertIn("4注", cc)
     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)
Example #16
0
 def test_options2_hand_choose11_case(self):
     '''广东11选5,任选二玩法,手选11个号流程测试'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gd_11_5_link()  # 点击广东11选5链接
     efcn = ElevenFiveChooseNumber_leyou(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(23, 1)  # 广东11选5任选二
     efcn.hand_options(11)  # 任选11个号
     efcn.confirm_number_button()  # 点击确认选号
 def test_option13_choose_out_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,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)
Example #18
0
 def test_option11_hand_choose2_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, 10)  # 广西11选5前二直选
     efcn.hand_options(2)  # 任选2个号码
     efcn.confirm_number_button()  # 点击确认选号
Example #19
0
 def test_option16_hand_choose3_case(self):
     '''广东11选5,乐选五玩法,任选5号码测试流程'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gd_11_5_link()  # 点击广东11选5链接
     efcn = ElevenFiveChooseNumber_leyou(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(23, 15)  # 广东11选5乐选五
     efcn.hand_options(5)  #任意选取5个号码
     efcn.confirm_number_button()  # 点击确认选号
Example #20
0
 def test_option14_hand_choose1_1_1_case(self):
     '''广东11选5,乐选三玩法,前三位各选1个号码测试流程'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gd_11_5_link()  # 点击广东11选5链接
     efcn = ElevenFiveChooseNumber_leyou(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(23, 13)  # 广东11选5乐选三
     efcn.different_three_num(1, 1, 1)  #前三位各选一个号码
     efcn.confirm_number_button()  #点击确认选号
 def test_UnionLotto_machine_one_after(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.machine_choose_button()  # 点击机选
     hb.machine_choose_one_button()  # 机选一注
     hb.Confirm_button()  # 确认选号
     hc.re_selection_num()
     hb.Select_bule()  ###添加一个蓝球
     hb.Confirm_button()  # 点击确认选号按钮
     mur = hc.lottery_number_text()  # 读取注数
     self.assertEqual('2', mur)  ##断言
     nu = hc.throw_time_text()  ###倍数
     self.assertEqual('1', nu)
     hc.submit_order_to_station_owner_button()
Example #22
0
 def test_group_six_add_clear_number_case(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_six_add_d()  ##点击组六和值
     hb.Group_six_addA()  ###点击一个数字
     hb2.clear_number()  # 点击清除选号页面
     hb1.Confirm_nu()  # 点击确认选号
     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()  # 点击确认支付
 def test_onestar_clear_num_case(self):
     '''一星玩法,选择5号码,并清除,流程测试'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     l = Login_leyou(self.driver)
     efcn = ElevenFiveChooseNumber_leyou(self.driver)
     ulcn = UnionLottoChooseNumber_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_random(5)  #选择5个号码
     aa = efcn.total_buy_text()
     self.assertIn("5注", aa)
     ulcn.clear_number()#清除所有选号
     cc = efcn.total_buy_text()
     self.assertIn("请至少选择1个号码", cc)
     ssc_cn.gewei_random(2)#选择2个号码
     aa = efcn.total_buy_text()
     self.assertIn("2注", aa)
Example #24
0
 def test_Lottery_DanTuo_4_18_1_11_case(self):
     '''胆拖模式前区选择4个胆码,18个拖码,后区选择1个胆码,11个拖码测试流程'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_leyou(self.driver)
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.DanTuo_mode()  # 选择胆拖模式
     blcn.l_red_four_eighteen()  # 红球选取4个胆码18个拖码
     blcn.l_bule_one_eleven()  # 后区选择1个胆码11个拖码
     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, "提交订单失败")
Example #25
0
 def test_options10_hand_choose1_1_case(self):
     '''广东11选5,前二直选玩法,前两位各选1个号码流程测试'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gd_11_5_link()  # 点击广东11选5链接
     efcn = ElevenFiveChooseNumber_leyou(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(23, 9)  # 广东11选5前二直选
     efcn.hand_options(1)  #第一位选取1个号码
     efcn.second_num_choose(1)  #第二位选取1个号码
     efcn.confirm_number_button()  # 点击确认选号
 def test_Lottery_Hand_choose_18_2_case(
         self):  ###################mj20171207
     """手选一注(复式),多注多倍,提交订单"""
     ###点击进入大乐透进入大乐透选号页面###
     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)
     blcn.l_red_label18()  # 任意选择5个红球
     blcn.l_bule_label2()  # 任意选择2个蓝球
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.Confirm_button()  # 点击确认选号按钮
     cl = ConfirmLottery_leyou(self.driver)
     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("856823", 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, "提交订单失败")
 def test_dantuo_option4_choose_2_3_case(self):
     '''山东11选5胆拖玩法,任选四玩法,3个胆码,2个拖码流程测试'''
     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, 18)  # 选择山东11选5胆拖模式任选四玩法
     efcn.dantuo_choose_num(3, 2)  # 选取3个胆码2个拖码
     total = efcn.total_buy_text()  # 获取注数文本
     self.assertIn("2", total)  # 检查2注
     efcn.confirm_number_button()  # 点击确认选号
Example #28
0
 def test_option12_hand_choose11_11_11_case(self):
     '''山东11选5,前三直选玩法,前三位各选11号码测试流程'''
     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, 11)  # 广西11选5前三直选
     efcn.hand_options(11)  # 第一位选取11个号码
     efcn.second_num_choose(11)  # 第二位选取11个号码
     efcn.third_num_choose(11)#第三位选取11个号码
     efcn.confirm_number_button()  # 点击确认选号
Example #29
0
 def test_dantuo_option5_choose_1_5_case(self):
     '''广东11选5胆拖玩法,任选五玩法,1个胆码,5个拖码流程测试'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.gd_11_5_link()  # 点击广东11选5链接
     efcn = ElevenFiveChooseNumber_leyou(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(23, 19)  # 选择广东11选5胆拖模式任选五玩法
     efcn.dantuo_choose_num(1, 5)  # 选取1个胆码5个拖码
     total = efcn.total_buy_text()  # 获取注数文本
     self.assertIn("5", total)  # 检查5注
     efcn.confirm_number_button()  # 点击确认选号
 def test_dantuo_front3_choose_1_3_case(self):
     '''山东11选5胆拖玩法,前三组选玩法,1个胆码,3个拖码流程测试'''
     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, 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()  #点击确认选号