def test_Lottery_Machine_Choose_ten_case(self):
     '''大乐透机选10注,追加10期测试'''
     hp = HomePage(self.driver)
     hp.open()
     hp.Moveable_float_close()  # 关闭悬浮窗口
     hp.Lottery_link()  # 点击大乐透链接
     ulcn = UnionLottoChooseNumber(self.driver)
     ulcn.machine_choose_button()  # 点击机选按钮
     ulcn.machine_choose_ten_button()  # 点击机选5注
     cl = ConfirmLottery(self.driver)
     blcl = BigLotteryConfirmLottery(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(self.driver)
     l.new_user_login_tab()  # 切换到新用户登录
     l.login()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess(self.driver)
     hp.Moveable_float_close()  # 关闭悬浮窗口
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
     # 返回首页
     sos.return_home()
Ejemplo n.º 2
0
 def test_Lottery_Dantuo_1_5_1_2_chase_throws_case(self):
     '''胆拖投注,在投注确认页面增加倍数和期数,提交订单'''
     ###点击进入大乐透选号页面###
     hp = HomePage(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum(self.driver)
     ulcn = UnionLottoChooseNumber(self.driver)
     blcl = BigLotteryConfirmLottery(self.driver)
     cl = ConfirmLottery(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(self.driver)
     l.new_user_login_tab()  # 切换到新用户登录
     l.login()  # 点击登录
     cl.submit_order_to_station_owner_button()  # 点击提交订单给站主
     cl.confirm_and_pay_button()  # 点击确认并支付
     sos = SubmitOrderSuccess(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
 def test_Lottery_Hand_history_double_bet_double_times_case(self):
     """选号页面,右上方隐藏的历史走势历史走势,多注多倍,提交订单"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()#点击大乐透链接
     blcn = BigLotteryChooseNum(self.driver)
     blcl = BigLotteryConfirmLottery(self.driver)
     cl = ConfirmLottery(self.driver)
     od = OrderDetails(self.driver)
     ulcn=UnionLottoChooseNumber(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(self.driver)
     l.new_user_login_tab()  # 切换到新用户登录
     l.login()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess(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_Hand_choose_single_chase_throws_case(self):
     """手动选号,单式,多注多倍,提交订单"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()#点击大乐透链接
     blcn = BigLotteryChooseNum(self.driver)
     blcl = BigLotteryConfirmLottery(self.driver)
     cl = ConfirmLottery(self.driver)
     blcn.l_red_label5()#任意选择5个红球
     blcn.l_bule_label2()#任意选择2个蓝球
     ulcn = UnionLottoChooseNumber(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(self.driver)
     l.new_user_login_tab()  # 切换到新用户登录
     l.login()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
     '''######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作