def test_Lottery_Machine_delete_all_num_cancel(self):
     '''测试提交订单页删除所有选号按钮,取消删除'''
     hp = HomePage_lelun(self.driver)
     hp.open()
     hp.Moveable_float_close()  # 关闭悬浮窗口
     hp.Lottery_link()  # 点击大乐透链接
     ulcn = UnionLottoChooseNumber_lelun(self.driver)
     ulcn.machine_choose_button()  # 点击机选按钮
     ulcn.machine_choose_five_button()  # 点击机选5注
     cl = ConfirmLottery_lelun(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_lelun(self.driver)
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lelun()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lelun(self.driver)
     hp.Moveable_float_close()  # 关闭悬浮窗口
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
Example #2
0
 def test_Lottery_Dantuo_1_5_1_2_chase_throws_case(self):
     '''胆拖投注,在投注确认页面增加倍数和期数,提交订单'''
     ###点击进入大乐透选号页面###
     hp = HomePage_lelun(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_lelun(self.driver)
     ulcn = UnionLottoChooseNumber_lelun(self.driver)
     blcl = BigLotteryConfirmLottery_lelun(self.driver)
     cl = ConfirmLottery_lelun(self.driver)
     ulcn.DanTuo_mode()  # 选择胆拖模式
     blcn.l_red_one_five()  # 红球选取1个胆码5个拖码
     blcn.l_bule_one_two()  # 后区选择1个胆码2个拖码
     ulcn.Confirm_button()  # 点击确认选号
     cl.chase_ticket_button()  #点击追xx期
     blcl.additional_radio_button()  # 点击追加单选按钮
     cl.chase_ticket_button_two()  # 点击追加2期单选按钮
     cl.throw_times_input(2)  # 输入投注倍数
     cl.submit_order_to_station_owner_button()  #点击提交订单给站主
     l = Login_lelun(self.driver)
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lelun()  # 点击登录
     cl.submit_order_to_station_owner_button()  # 点击提交订单给站主
     cl.confirm_and_pay_button()  # 点击确认并支付
     sos = SubmitOrderSuccess_lelun(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
 def test_Lottery_Machine_choose_one_button_double_delete_case(self):
     '''复式,验证删除流程'''
     hp = HomePage_lelun(self.driver)
     hp.open()
     hp.Moveable_float_close()  # 关闭悬浮窗口
     hp.Lottery_link()  # 点击大乐透链接
     ulcn = UnionLottoChooseNumber_lelun(self.driver)
     blcn = BigLotteryChooseNum_lelun(self.driver)
     ulcn.machine_choose_button()  # 点击机选按钮
     ulcn.machine_choose_one_button()  # 点击机选一注
     ulcn.Confirm_button()  # 点击确认选号按钮
     cl = ConfirmLottery_lelun(self.driver)
     cl.delete_all_num_button()  #点击删除所有按钮
     cl.confirm_delete_button()  #确认删除
     blcn.l_red_label18()  # 任意选择18个红球
     blcn.l_bule_label2()  # 任意选择2个蓝球
     ulcn.Confirm_button()  # 点击确认选号按钮
     cl.submit_order_to_station_owner_button()  #提交订单给站主
     l = Login_lelun(self.driver)
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lelun()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lelun(self.driver)
     hp.Moveable_float_close()  # 关闭悬浮窗口
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
Example #4
0
 def test_Lottery_Hand_r5b12_case(self):
     """大乐透手选5个红球12个蓝球购买流程测试"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_lelun(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_lelun(self.driver)
     blcn.l_red_label5()  # 任意选择5个红球
     blcn.l_bule_label12()  # 任意选择12个蓝球
     ulcn = UnionLottoChooseNumber_lelun(self.driver)
     ulcn.Confirm_button()  # 点击确认选号按钮
     cl = ConfirmLottery_lelun(self.driver)
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     #####用户登录######
     l = Login_lelun(self.driver)
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lelun()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lelun(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
Example #5
0
 def test_Lottery_Dantuo_1_5_1_2_case(self):
     '''胆拖模式前区选择1个胆码,5个拖码,后区选择1个胆码,2个拖码测试流程'''
     ###点击进入大乐透选号页面###
     hp = HomePage_lelun(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_lelun(self.driver)
     ulcn = UnionLottoChooseNumber_lelun(self.driver)
     ulcn.DanTuo_mode()  # 选择胆拖模式
     blcn.l_red_one_five()  # 红球选取1个胆码5个拖码
     blcn.l_bule_one_two()  # 后区选择1个胆码2个拖码
     ulcn.Confirm_button()  # 点击确认选号
     cl = ConfirmLottery_lelun(self.driver)
     cl.submit_order_to_station_owner_button()  # 点击提交订单给站主
     l = Login_lelun(self.driver)
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lelun()  # 点击登录
     cl.submit_order_to_station_owner_button()  # 点击提交订单给站主
     cl.confirm_and_pay_button()  # 点击确认并支付
     sos = SubmitOrderSuccess_lelun(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
Example #6
0
 def test_SuccessPage_continue_buy_case(self):
     '''订单详情页,点击【点击投注大乐透】,页面跳转至选号页面,选择一注,提交订单'''
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_lelun(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     l = Login_lelun(self.driver)
     hp.My_lottery_ticket()  # 点击我的彩票
     l.login_lelun()  # 点击登录
     sos = SubmitOrderSuccess_lelun(self.driver)
     hp.homepage_link()  # 点击首页
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_lelun(self.driver)
     blcl = BigLotteryConfirmLottery_lelun(self.driver)
     cl = ConfirmLottery_lelun(self.driver)
     od = OrderDetails_lelun(self.driver)
     ulcn = UnionLottoChooseNumber_lelun(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()  # 点击确认支付
     hp.Moveable_float_close()
     sos.Continue_buy()  #点击继续购买此彩种
     blcn.l_red_label5()  # 选择5个红球
     blcn.l_bule_label2()  # 选择2个蓝球
     ulcn.Confirm_button()  # 点击确认选号按钮
Example #7
0
 def test_Lottery_multiphase_machine_single_radio_case(self):
     """选号页面,右上方隐藏的多期机选,点击追加单选按钮,提交订单"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_lelun(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     l = Login_lelun(self.driver)
     hp.My_lottery_ticket()  # 点击我的彩票
     l.login_lelun()  # 点击登录
     hp.homepage_link()  # 点击首页
     hp.Moveable_float_close()
     hp.Lottery_link()  #点击大乐透链接
     blcn = BigLotteryChooseNum_lelun(self.driver)
     blcl = BigLotteryConfirmLottery_lelun(self.driver)
     cl = ConfirmLottery_lelun(self.driver)
     od = OrderDetails_lelun(self.driver)
     ulcn = UnionLottoChooseNumber_lelun(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_lelun(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
Example #8
0
 def test_LotteryOderDetails_continue_buy_case(self):
     '''提交订单成功页,点击【继续购买该方案】,页面跳转至投注确认页'''
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_lelun(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     l = Login_lelun(self.driver)
     hp.My_lottery_ticket()  # 点击我的彩票
     l.login_lelun()  # 点击登录
     sos = SubmitOrderSuccess_lelun(self.driver)
     hp.homepage_link()  # 点击首页
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_lelun(self.driver)
     blcl = BigLotteryConfirmLottery_lelun(self.driver)
     cl = ConfirmLottery_lelun(self.driver)
     od = OrderDetails_lelun(self.driver)
     ulcn = UnionLottoChooseNumber_lelun(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()  #点击确认支付
     hp.Moveable_float_close()
     sos.check_order_details()  #点击查看订单详情
     mu2 = od.Betting_nu()  #读取订单详情页号码
     self.assertEqual(mu1, mu2, '订单详情页显示有误')
     od.Scheme()  #点击继续购买此方案
     mur = cl.confirm_num_page_text()
     self.assertEqual('提交订单给站主', mur)
Example #9
0
 def test_Lottery_re_r18b1_case(self):
     '''大乐透重复选号取消选中测试'''
     ###点击进入大乐透选号页面###
     hp = HomePage_lelun(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_lelun(self.driver)
     blcn.l_rechoose_red_label18()  #随机选中18个红球,再取消选中的红球
     blcn.l_red_label18()  #重新选取18个红球
     blcn.l_bule_label2()  #选取2个蓝球
     ulcn = UnionLottoChooseNumber_lelun(self.driver)
     ulcn.Confirm_button()  #点击确认选号按钮
     cl = ConfirmLottery_lelun(self.driver)
     cl.submit_order_to_station_owner_button()  # 提交订单给站主
     l = Login_lelun(self.driver)  #####用户登录######
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lelun()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击确认并支付按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lelun(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
Example #10
0
 def test_Lottery_multiphase_machine_choose5_case(self):
     """选号页面,右上方隐藏的多期机选,5期提交订单"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_lelun(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  #点击大乐透链接
     blcn = BigLotteryChooseNum_lelun(self.driver)
     blcl = BigLotteryConfirmLottery_lelun(self.driver)
     cl = ConfirmLottery_lelun(self.driver)
     od = OrderDetails_lelun(self.driver)
     ulcn = UnionLottoChooseNumber_lelun(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_lelun(self.driver)
     l.login_lelun()
     ulcn.There_clock()  # 点击。。。
     ulcn.Many_pause()  # 点击多期机选
     ulcn.many_machine_choose(5)  # 点击5期
     ulcn.Many_pause_confirm()  # 点击多期机选页的【提交订单】
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lelun(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
 def test_Lottery_Machine_delete_all_num(self):
     '''测试提交订单页"删除所有选号"按钮,确认删除'''
     hp = HomePage_lelun(self.driver)
     hp.open()
     hp.Moveable_float_close()  # 关闭悬浮窗口
     hp.Lottery_link()  # 点击大乐透链接
     ulcn = UnionLottoChooseNumber_lelun(self.driver)
     ulcn.machine_choose_button()  # 点击机选按钮
     ulcn.machine_choose_five_button()  # 点击机选5注
     cl = ConfirmLottery_lelun(self.driver)
     cl.delete_all_num_button()  #点击删除所有选号按钮
     cl.confirm_delete_button()  #点击确认删除按钮
     ulcn.machine_choose_button()  # 点击机选按钮
     ulcn.machine_choose_one_button()  #点击机选1注
     ulcn.Confirm_button()  #确认选号
     cl.submit_order_to_station_owner_button()  # 提交订单给站主
     l = Login_lelun(self.driver)
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lelun()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lelun(self.driver)
     hp.Moveable_float_close()  # 关闭悬浮窗口
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
Example #12
0
 def test_Lottery_Hand_r18b16_case(self):
     '''大乐透选取18个红球,12个蓝球提示“投注金额不能大于100000元”测试'''
     ###点击进入大乐透选号页面###
     hp = HomePage_lelun(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_lelun(self.driver)
     blcn.l_red_label18()  # 选取18个红球
     blcn.l_bule_label12()  #选取12个蓝球
     ulcn = UnionLottoChooseNumber_lelun(self.driver)
     ulcn.Confirm_button()  # 点击确认选号按钮
     cl = ConfirmLottery_lelun(self.driver)
     cl.submit_order_to_station_owner_button()  # 提交订单给站主
     l = Login_lelun(self.driver)  #####用户登录######
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lelun()
     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_lelun(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
Example #13
0
 def test_Lottery_Hand_r19_case(self):
     '''大乐透选取19个红球,第19个红球提示“红球不能超过18个”测试'''
     ###点击进入大乐透选号页面###
     hp = HomePage_lelun(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_lelun(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_lelun(self.driver)
     ulcn.Confirm_button()  # 点击确认选号按钮
     cl = ConfirmLottery_lelun(self.driver)
     cl.submit_order_to_station_owner_button()  # 提交订单给站主
     l = Login_lelun(self.driver)  #####用户登录######
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lelun()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lelun(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
 def test_Lottery_Machine_Choose_ten_case(self):
     '''大乐透机选10注,追加10期测试'''
     hp = HomePage_lelun(self.driver)
     hp.open()
     hp.Moveable_float_close()  # 关闭悬浮窗口
     hp.Lottery_link()  # 点击大乐透链接
     ulcn = UnionLottoChooseNumber_lelun(self.driver)
     ulcn.machine_choose_button()  # 点击机选按钮
     ulcn.machine_choose_ten_button()  # 点击机选5注
     cl = ConfirmLottery_lelun(self.driver)
     blcl = BigLotteryConfirmLottery_lelun(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_lelun(self.driver)
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lelun()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lelun(self.driver)
     hp.Moveable_float_close()  # 关闭悬浮窗口
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
     # 返回首页
     sos.return_home()
Example #15
0
 def test_Lottery_Hand_history_double_bet_double_times_case(self):
     """选号页面,右上方隐藏的历史走势历史走势,多注多倍,提交订单"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_lelun(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  #点击大乐透链接
     blcn = BigLotteryChooseNum_lelun(self.driver)
     blcl = BigLotteryConfirmLottery_lelun(self.driver)
     cl = ConfirmLottery_lelun(self.driver)
     od = OrderDetails_lelun(self.driver)
     ulcn = UnionLottoChooseNumber_lelun(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_lelun(self.driver)
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lelun()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lelun(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)
 def test_Lottery_Machine_cancel_pay(self):
     '''测试提交订单页确认支付弹窗的x按钮'''
     hp = HomePage_lelun(self.driver)
     hp.open()
     hp.Moveable_float_close()  # 关闭悬浮窗口
     hp.Lottery_link()  # 点击大乐透链接
     ulcn = UnionLottoChooseNumber_lelun(self.driver)
     ulcn.machine_choose_button()  # 点击机选按钮
     ulcn.machine_choose_one_button()  # 点击机选一注
     ulcn.Confirm_button()  # 点击确认选号按钮
     cl = ConfirmLottery_lelun(self.driver)
     cl.submit_order_to_station_owner_button()  #提交订单给站主
     l = Login_lelun(self.driver)
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lelun()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.cancel_pay_button()  #确认支付页点击x按钮
     '''断言验证取消支付成功'''
     text = cl.confirm_num_page_text()
     self.assertEqual("提交订单给站主", text)
     print("我已放弃删除,回到了" + text + "页")
Example #17
0
 def test_one_lottery_ckick_x_case(self):
     '''在投注确认页面,单注号码,点击左边X按钮,页面能跳转到选号页'''
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_lelun(self.driver)
     hd = ArrangeFiveConfirmLottery_lelun(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     l = Login_lelun(self.driver)
     hp.My_lottery_ticket()  # 点击我的彩票
     l.login_lelun()  # 点击登录
     sos = SubmitOrderSuccess_lelun(self.driver)
     hp.homepage_link()  # 点击首页
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_lelun(self.driver)
     blcl = BigLotteryConfirmLottery_lelun(self.driver)
     cl = ConfirmLottery_lelun(self.driver)
     od = OrderDetails_lelun(self.driver)
     ulcn = UnionLottoChooseNumber_lelun(self.driver)
     ulcn.machine_choose_button()  #点击机选按钮
     ulcn.machine_choose_one_button()  #点击机选1注
     ulcn.Confirm_button()  # 确认选号
     mur = cl.lottery_number_text()
     self.assertEqual('1', mur)
     cl.Del_x()  #点击单个删除x
     ulcn.machine_choose_button()  # 点击机选按钮
     ulcn.machine_choose_five_button()  # 点击机选5注
     num1 = cl.lottery_number_text()  # 获取注数
     self.assertIn("5", 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)
Example #18
0
 def test_Lottery_Hand_choose_18_2_case(
         self):  ###################mj20171207
     """手选一注(复式),多注多倍,提交订单"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_lelun(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_lelun(self.driver)
     blcl = BigLotteryConfirmLottery_lelun(self.driver)
     blcn.l_red_label18()  # 任意选择5个红球
     blcn.l_bule_label2()  # 任意选择2个蓝球
     ulcn = UnionLottoChooseNumber_lelun(self.driver)
     ulcn.Confirm_button()  # 点击确认选号按钮
     cl = ConfirmLottery_lelun(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_lelun(self.driver)
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lelun()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lelun(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     '''hp.Moveable_float_close()
Example #19
0
 def test_Lottery_Hand_history_Recommended_number_case(self):
     """选号页历史开奖,使用推荐号码,提交订单"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_lelun(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  #点击大乐透链接
     blcn = BigLotteryChooseNum_lelun(self.driver)
     blcl = BigLotteryConfirmLottery_lelun(self.driver)
     cl = ConfirmLottery_lelun(self.driver)
     ulcn = UnionLottoChooseNumber_lelun(self.driver)
     od = OrderDetails_lelun(self.driver)
     ulcn.History()  #点击历史开奖
     ulcn.click_history()  #点击展开了的历史开奖
     lottery1 = ulcn.Recommended_nu()  # 读取推荐号码
     ulcn.Recommended_number()  #点击使用推荐号码
     ulcn.Confirm_button()  # 点击确认选号按钮
     num1 = cl.lottery_number_text()  # 获取注数
     chase = cl.chase_time_text()  # 获取追号期数
     times = cl.throw_time_text()  # 获取倍数
     self.assertEqual("111", num1 + chase + times)
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     #####用户登录######
     l = Login_lelun(self.driver)
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lelun()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lelun(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
     sos.check_order_details()  ##点击查看订单详情
     lottery2 = od.Betting_number()  ##读取显示的投注号码
     self.assertEqual(lottery1, lottery2)