def test_UnionLotto_DanTuo_many_case(self):
     """增加倍数和期数"""
     ha = HomePage_lexiu(self.driver)
     hb = UnionLottoChooseNumber_lexiu(self.driver)
     hc = ConfirmLottery_lexiu(self.driver)
     hl = Login_lexiu(self.driver)
     hd = SubmitOrderSuccess_lexiu(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.UnionLotto_link()  # 点击双色球链接
     hb.DanTuo_mode()  # 选择胆拖模式
     hb.u_red_five_two()  # 红球选取5个胆码2个拖码
     hb.u_bule_one()  # 选取一个蓝球
     hb.Confirm_button()  # 确认选号
     hc.throw_times_input(13)
     hc.chase_ticket_button()  # 点击追xx期
     hc.chase_ticket_button_twenty()  # 点击追20期
     mur = hc.lottery_number_text()  # 读取注数
     self.assertEqual('2', mur)  ##断言
     nu = hc.throw_time_text()  ###倍数
     self.assertEqual('13', nu)
     chase_time_text = hc.chase_time_text()  # 获取追号期数
     self.assertIn("20", chase_time_text)  # 检查追号期数为20期
     hc.submit_order_to_station_owner_button()
Esempio n. 2
0
 def test_UnionLotto_Machine_chase_three_case(self):
     '''输入追3期流程测试'''
     hp = HomePage_lexiu(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.UnionLotto_link()  # 点击双色球链接
     ####选择机选一注并确认选号####
     ulcn = UnionLottoChooseNumber_lexiu(self.driver)
     ulcn.machine_choose_button()  # 点击机选
     ulcn.machine_choose_one_button()  # 机选1注
     ulcn.Confirm_button()  # 确认选号
     cl = ConfirmLottery_lexiu(self.driver)
     cl.chase_ticket_input("3")  #输入追3期
     lottery_number_text = cl.lottery_number_text()  # 获取投注注数文本
     self.assertIn("1", lottery_number_text)  # 检查投注注数为1注
     chase_time_text = cl.chase_time_text()  # 获取追号期数
     self.assertIn("3", chase_time_text)  # 检查追号期数为3期
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     #####用户登录######
     l = Login_lexiu(self.driver)
     l.login_lexiu()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 确认支付
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lexiu(self.driver)
     text = sos.submit_order_success()
     hp.Moveable_float_close()  # 关闭弹窗
     self.assertEqual("订单提交成功", text, "提交订单失败")
     trade_text = sos.trade_name_text()  # 获取商品名称
     self.assertIn("商品名称:乐秀赢球-双色球", trade_text)  # 检查商品名称正确
     sos.check_order_details()  # 查看订单详情
     od = OrderDetails_lexiu(self.driver)
     od.chase_order_details_check()  # 检查订单详情页
Esempio n. 3
0
 def test_UnionLotto_Machine_choose_five_delete_one_case(self):
     '''机选五注删除一注流程测试'''
     ###点击进入双色球选号页面###
     hp = HomePage_lexiu(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.UnionLotto_link()  # 点击双色球链接
     ####选择机选一注并确认选号####
     ulcn = UnionLottoChooseNumber_lexiu(self.driver)
     ulcn.machine_choose_button()  # 点击机选
     ulcn.machine_choose_five_button()  # 机选5注
     ######进入提交订单页面######
     cl = ConfirmLottery_lexiu(self.driver)
     chase = cl.chase_time_text()  # 获取追号期数
     times = cl.throw_time_text()  # 获取输入的投注倍数
     lottery_num = cl.lottery_number_text()  #获取投注注数
     self.assertEqual("5", lottery_num)  #检查投注的注数为5注
     self.assertEqual("1", chase)  # 检查追号期数1期
     self.assertEqual("1", times)  # 检查投注倍数1倍
     cl.delete_one_num_button()  #点击删除一注
     chase = cl.chase_time_text()  # 获取追号期数
     times = cl.throw_time_text()  # 获取输入的投注倍数
     lottery_num = cl.lottery_number_text()  # 获取投注注数
     self.assertEqual("4", lottery_num)  # 检查投注的注数为4注
     self.assertEqual("1", chase)  # 检查追号期数1期
     self.assertEqual("1", times)  # 检查投注倍数1倍
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     #####用户登录######
     l = Login_lexiu(self.driver)
     l.login_lexiu()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lexiu(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     trade_text = sos.trade_name_text()  # 获取商品名称
     self.assertIn("商品名称:乐秀赢球-双色球", trade_text)  # 检查商品名称正确
     sos.check_order_details()  # 查看订单详情
     od = OrderDetails_lexiu(self.driver)
     od.order_details_check()  # 检查订单详情页
 def test_Lottery_Hand_choose_18_2_case(
         self):  ###################mj20171207
     """手选一注(复式),多注多倍,提交订单"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_lexiu(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_lexiu(self.driver)
     blcl = BigLotteryConfirmLottery_lexiu(self.driver)
     blcn.l_red_label18()  # 任意选择5个红球
     blcn.l_bule_label2()  # 任意选择2个蓝球
     ulcn = UnionLottoChooseNumber_lexiu(self.driver)
     ulcn.Confirm_button()  # 点击确认选号按钮
     cl = ConfirmLottery_lexiu(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_lexiu(self.driver)
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lexiu()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lexiu(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     # 返回首页
     sos.return_home()
     hp.Moveable_float_close()
     # 点击我的彩票,进入我的个人中心页面
     hp.MyTicket_link()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     # 点击个人中心页面右上角的设置,进入设置页面
     mt = MyTicket_lexiu(self.driver)
     mt.setup_link()  # 点击设置按钮
     # 点击设置页面的“退出账户”按钮
     su = SetUp_lexiu(self.driver)
     su.LogOut_button()
 def test_Lottery_Hand_history_double_bet_double_times_case(self):
     """选号页面,右上方隐藏的历史走势历史走势,多注多倍,提交订单"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_lexiu(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  #点击大乐透链接
     blcn = BigLotteryChooseNum_lexiu(self.driver)
     blcl = BigLotteryConfirmLottery_lexiu(self.driver)
     cl = ConfirmLottery_lexiu(self.driver)
     od = OrderDetails_lexiu(self.driver)
     ulcn = UnionLottoChooseNumber_lexiu(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_lexiu(self.driver)
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lexiu()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lexiu(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_history_Recommended_number_case(self):
     """选号页历史开奖,使用推荐号码,提交订单"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_lexiu(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  #点击大乐透链接
     blcn = BigLotteryChooseNum_lexiu(self.driver)
     blcl = BigLotteryConfirmLottery_lexiu(self.driver)
     cl = ConfirmLottery_lexiu(self.driver)
     ulcn = UnionLottoChooseNumber_lexiu(self.driver)
     od = OrderDetails_lexiu(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_lexiu(self.driver)
     #l.new_user_login_tab()  # 切换到新用户登录
     l.login_lexiu()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lexiu(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)
 def test_Lottery_information_buy_pause_five_case(self):
     """进入开奖公告,打开双色球开奖详情,点击投注双色球,进入双色球投注页面,选1注号码,在投注确认页,机选5注,修改倍数,期数"""
     ha = HomePage_lexiu(self.driver)
     hl = Login_lexiu(self.driver)
     hb = UnionLottoChooseNumber_lexiu(self.driver)
     hc = ConfirmLottery_lexiu(self.driver)
     hd = PaymetMode_lexiu(self.driver)
     he = BaofooPayment_lexiu(self.driver)
     hf = ChooseBank_lexiu(self.driver)
     hf1 = SubmitOrderSuccess_lexiu(self.driver)
     hf2 = LessPaySucess_lexiu(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.Lottery_information()  ##点击开奖信息
     hb.Lottery_information_unionlotto()  ##点击开奖信息中的双色球
     hc.Unionlotto_History_buy()  ###点击双色球最近的开奖信息
     hc.Buy_unionlotto()  ##点击投注双色球
     hb.u_red_label6()  # 任意选择6个红球
     hb.u_bule_label1()  # 任意选择1个蓝球
     hb.Confirm_button()  # 点击确认选号按钮
     hc.machine_choose_five_button()  ##点击机选5注
     hc.chase_ticket_input("4")  # 输入追4期
     hc.throw_times_input("3")  #输入投注倍数为3倍
     lottery_number_text = hc.lottery_number_text()  # 获取投注注数文本
     self.assertIn("6", lottery_number_text)  # 检查投注注数为1注
     chase_time_text = hc.chase_time_text()  # 获取追号期数
     self.assertIn("4", chase_time_text)  # 检查追号期数为4期
     throw_times = hc.throw_time_text()  # 获取投注倍数定位
     self.assertIn("3", throw_times)  # 检查投注倍数为3倍
     hc.submit_order_to_station_owner_button()  # 点击提交给站主
     hl.login_lexiu()  # 输入账号,密码
     hc.submit_order_to_station_owner_button()  # 点击提交给站主
     hc.confirm_and_pay_button()  # 点击确认支付
     text1 = hf1.submit_order_success()  # 获取提交订单成功文本
     self.assertEqual('订单提交成功', text1)