Exemple #1
0
 def test_Direct_add_Del_all_nu_case(self):
     """验证确认投注页面,点击删除选号图标功能"""
     ha = HomePage_leyou(self.driver)
     hb = UnionLottoChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hc1 = PaintBallChooseNumber_leyou(self.driver)
     hd = PaintBallConfirm_leyou(self.driver)
     hd1 = There_D_choosenumber_leyou(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.UnionLotto_link()  # 点击双色球链接
     hb.u_red_label6()  # 任意选择6个红球
     hb.u_bule_label1()  # 任意选择1个蓝球
     hb.Confirm_button()  # 点击确认选号按钮
     hc.delete_all_num_button()  ###点击清除所有选号
     mur = hd1.Clear()
     self.assertEqual('清空', mur)
Exemple #2
0
 def test_UnionLotto_after_many_note_many_multiple(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.u_red_label18()  # 任意选择18个红球
     hb.u_bule_label1()  # 任意选择1个蓝球
     hb.Confirm_button()  # 点击确认选号按钮
     hc.throw_times_input(13)
     mur = hc.lottery_number_text()  # 读取注数
     self.assertEqual('18564', mur)  ##断言
     nu = hc.throw_time_text()  ###倍数
     self.assertEqual('13', nu)
     hc.submit_order_to_station_owner_button()
Exemple #3
0
 def test_UnionLotto_risk(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.u_red_label6()  # 任意选择6个红球
     hb.u_bule_label1()  # 任意选择1个蓝球
     hb.Confirm_button()  # 点击确认选号按钮
     hc.Risk()  ##点击用户协议
     hc.Risk_know()  ##点击用户协议我知道了
     mur = hc.lottery_number_text()  # 读取注数
     self.assertEqual('1', mur)  ##断言
     nu = hc.throw_time_text()  ###倍数
     self.assertEqual('1', nu)
     hc.submit_order_to_station_owner_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()
Exemple #5
0
 def test_UnionLotto_many_pause(self):
     """多期机选"""
     ha = HomePage_leyou(self.driver)
     hb = UnionLottoChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hl = Login_leyou(self.driver)
     hd = SubmitOrderSuccess_leyou(self.driver)
     he = OrderDetails_leyou(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.My_lottery_ticket()  ##点击我的彩票
     hl.login_leyou()  ##登录
     ha.Home_page()  ##点击首页
     ha.UnionLotto_link()  # 点击双色球链接
     hb.There_clock()  ##点击右上角。。。
     hb.Many_pause()  #点击多期机选
     hb.Many_pause_nu()  ##点击期号
     hb.Many_pause_confirm()  ##点击提交
     hc.confirm_and_pay_button()  # 点击确认支付
Exemple #6
0
 def test_UnionLotto_DanTuo_5_2_16_case(self):
     """红球胆码5个 ,红球拖码 2个,蓝球16个"""
     ha = HomePage_leyou(self.driver)
     hb = UnionLottoChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hl = Login_leyou(self.driver)
     hd = SubmitOrderSuccess_leyou(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_sixteen()  ##选择16个蓝球
     hb.Confirm_button()  # 确认选号
     mur = hc.lottery_number_text()  # 读取注数
     self.assertEqual('32', mur)  ##断言
     nu = hc.throw_time_text()  ###倍数
     self.assertEqual('1', nu)
     hc.submit_order_to_station_owner_button()
 def test_UnionLotto_Continue_pick(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.u_red_label6()  # 任意选择6个红球
     hb.u_bule_label1()  # 任意选择1个蓝球
     hb.Confirm_button()  # 点击确认选号按钮
     hc.continue_choose_num_button()  ##继续选号
     hb.u_red_label18()  # 任意选择18个红球
     hb.u_bule_label1()  # 任意选择1个蓝球
     hb.Confirm_button()  # 点击确认选号按钮
     mur = hc.lottery_number_text()  # 读取注数
     self.assertEqual('18565', mur)
     nu = hc.throw_time_text()  ###倍数
     self.assertEqual('1', nu)
     hc.submit_order_to_station_owner_button()  ##点击提交给站主
 def test_UnionLotto_assemblage_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.continue_choose_num_button()  ##继续选号
     hb.u_red_label18()  # 任意选择18个红球
     hb.u_bule_label1()  # 任意选择1个蓝球
     hb.Confirm_button()  # 点击确认选号按钮
     mur = hc.lottery_number_text()  # 读取注数
     self.assertEqual('18565', mur)  ##断言
     nu = hc.throw_time_text()  ###倍数
     self.assertEqual('1', nu)
     hc.submit_order_to_station_owner_button()
 def test_less_payment_shortfall_case(self):
     '''验证差额支付流程'''
     ###点击进入双色球选号页面###
     hp = HomePage_leyou(self.driver)
     hp.open()
     l = Login_leyou(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.UnionLotto_link()  #点击双色球链接
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.u_red_label6()  # 任意选择6个红球
     ulcn.u_bule_label1()  # 任意选择1个蓝球
     ulcn.Confirm_button()  # 点击确认选号按钮
     cl = ConfirmLottery_leyou(self.driver)
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     l.login_nomoney_leyou()  #点击登录
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     pm = PaymetMode_leyou(self.driver)
     mur = pm.Top_up()  ##获取充值成功文本
     self.assertEqual('充值', mur)
 def test_UnionLotto_Machine_choose_ten__case(self):
     '''机选十注流程测试'''
     ###点击进入双色球选号页面###
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.UnionLotto_link()  # 点击双色球链接
     ####选择机选一注并确认选号####
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.machine_choose_button()  # 点击机选
     ulcn.machine_choose_ten_button()  # 机选10注
     ######进入提交订单页面######
     cl = ConfirmLottery_leyou(self.driver)
     chase = cl.chase_time_text()  # 获取追号期数
     times = cl.throw_time_text()  # 获取输入的投注倍数
     lottery_num = cl.lottery_number_text()  # 获取投注注数
     self.assertEqual("10", lottery_num)  # 检查投注的注数为10注
     self.assertEqual("1", chase)  # 检查追号期数是否是所选期数
     self.assertEqual("1", times)  # 检查投注倍数是否是所投注倍数
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     #####用户登录######
     l = Login_leyou(self.driver)
     l.login_leyou()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_leyou(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_leyou(self.driver)
     od.order_details_checks()  # 检查订单详情页
 def test_UnionLotto_Machine_input_three_times_add_case(self):
     '''输入投3倍,再点击+流程测试'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.UnionLotto_link()  # 点击双色球链接
     ####选择机选一注并确认选号####
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.machine_choose_button()  # 点击机选
     ulcn.machine_choose_one_button()  # 机选1注
     ulcn.Confirm_button()  # 确认选号
     cl = ConfirmLottery_leyou(self.driver)
     cl.throw_times_input("3")  #输入投注倍数为3倍
     lottery_number_text = cl.lottery_number_text()  # 获取投注注数文本
     self.assertIn("1", lottery_number_text)  # 检查投注注数为1注
     throw_times = cl.throw_time_text()  #获取投注倍数定位
     self.assertIn("3", throw_times)  #检查投注倍数为3倍
     cl.u_throw_times_button_add()  #点击+
     lottery_number_text = cl.lottery_number_text()  # 获取投注注数文本
     self.assertIn("1", lottery_number_text)  # 检查投注注数为1注
     throw_times = cl.throw_time_text()  # 获取投注倍数定位
     self.assertIn("4", throw_times)  # 检查投注倍数为4倍
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     #####用户登录######
     l = Login_leyou(self.driver)
     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, "提交订单失败")
     trade_text = sos.trade_name_text()  # 获取商品名称
     self.assertIn("商品名称:乐优炫彩-双色球", trade_text)  # 检查商品名称正确
     sos.check_order_details()  # 查看订单详情
     od = OrderDetails_leyou(self.driver)
     od.order_details_check()  # 检查订单详情页
Exemple #12
0
 def test_UnionLotto_DanTuo_Continue_buy_scheme_case(self):
     """继续购买该方案"""
     ha = HomePage_leyou(self.driver)
     hb = UnionLottoChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hl = Login_leyou(self.driver)
     hd = SubmitOrderSuccess_leyou(self.driver)
     he = OrderDetails_leyou(self.driver)
     hf = SubmitOrderSuccess_leyou(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()  # 确认选号
     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()
     #hl.new_user_login_tab()  # 点击新登录
     hl.login_leyou()  # 输入账号,密码
     hc.submit_order_to_station_owner_button()  # 点击提交给站主
     hc.confirm_and_pay_button()  # 点击确认支付
     ha.Moveable_float_close()
     hd.check_order_details()  ##点击查看订单详情
     mur4 = he.order_status()
     self.assertEqual('待出票', mur4)
     he.Scheme()  # 点击继续购买该方案
     mur2 = hc.confirm_num_page_text()
     self.assertEqual('提交订单给站主', mur2)
     hc.submit_order_to_station_owner_button()  # 点击提交给站主
     a = hc.confirm_and_pay_button()  # 点击确认支付
     if a != 2:
         ha.Moveable_float_close()
         text1 = hf.submit_order_success()  # 获取提交订单成功文本
         self.assertEqual('订单提交成功', text1)
Exemple #13
0
 def test_UnionLotto_Hand_r6b16_case(self):
     '''双色球手选6个红球16个蓝球购买流程测试'''
     ###点击进入双色球选号页面###
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.UnionLotto_link()  # 点击双色球链接
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.u_red_label6()  # 选取6个红球
     ulcn.u_bule_label16()  # 选取16个蓝球
     ulcn.Confirm_button()  # 点击确认选号按钮
     cl = ConfirmLottery_leyou(self.driver)
     cl.submit_order_to_station_owner_button()  # 提交订单给站主
     l = Login_leyou(self.driver)  #####用户登录######
     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, "提交订单失败")
Exemple #14
0
 def test_UnionLotto_unitary_many_note_del_X(self):
     """左边X按钮,能够删除所选号码"""
     ha = HomePage_leyou(self.driver)
     hb = UnionLottoChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hd = PaintBallConfirm_leyou(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.UnionLotto_link()  # 点击双色球链接
     hb.u_red_label6()  # 任意选择6个红球
     hb.u_bule_label1()  # 任意选择1个蓝球
     hb.Confirm_button()  # 点击确认选号按钮
     hc.continue_choose_num_button()  ##继续选号
     hb.u_red_label6()  # 任意选择6个红球
     hb.u_bule_label1()  # 任意选择1个蓝球
     hb.Confirm_button()  # 点击确认选号按钮
     hc.Del_x()  ##点击左侧X按钮
     mur = hc.lottery_number_text()  # 读取注数
     self.assertEqual('1', mur)  ##断言
     nu = hc.throw_time_text()  ###倍数
     self.assertEqual('1', nu)
     hc.submit_order_to_station_owner_button()
 def test_UnionLotton_Machine_cancel_pay(self):
     '''机选一注取消支付测试'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.UnionLotto_link()  # 点击双色球链接
     ####选择机选一注并确认选号####
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.machine_choose_button()  # 点击机选
     ulcn.machine_choose_one_button()  # 机选1注
     ulcn.Confirm_button()  # 确认选号
     cl = ConfirmLottery_leyou(self.driver)
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     #####用户登录######
     l = Login_leyou(self.driver)
     l.login_leyou()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.cancel_pay_button()  #点击取消支付x按钮
     '''断言验证取消支付成功'''
     text = cl.confirm_num_page_text()
     self.assertEqual("提交订单给站主", text)
     print("我已放弃删除,回到了" + text + "页")
Exemple #16
0
 def test_UnionLotto_DanTuo_6_19_1_case(self):
     '''手选6个胆码19个拖码,1个蓝球的流程测试'''
     ###点击进入双色球选号页面###
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.UnionLotto_link()  # 点击双色球链接
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.DanTuo_mode()  # 选择胆拖模式
     ulcn.u_red_six_nineteen()  # 红球选取6个胆码19个拖码
     ulcn.u_bule_one()  # 选取1个蓝球
     ulcn.Confirm_button()  # 点击确认选号
     cl = ConfirmLottery_leyou(self.driver)
     cl.submit_order_to_station_owner_button()  # 点击提交订单给站主
     l = Login_leyou(self.driver)
     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_UnionLotto_Machine_delete_all_num_case(self):
     '''提交订单页“删除所有选号”按钮并确认删除测试'''
     hp = HomePage_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.UnionLotto_link()  # 点击双色球链接
     ulcn = UnionLottoChooseNumber_leyou(self.driver)
     ulcn.machine_choose_button()  # 点击机选
     ulcn.machine_choose_one_button()  # 机选1注
     ulcn.Confirm_button()  #确认选号
     cl = ConfirmLottery_leyou(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 = ConfirmLottery_leyou(self.driver)
     lottery_number = cl.lottery_number_text()  #获取投注注数文本
     self.assertIn("1", lottery_number)  #检查投注注数
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     #####用户登录######
     l = Login_leyou(self.driver)
     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, "提交订单失败")
     trade_text = sos.trade_name_text()  # 获取商品名称
     self.assertIn("商品名称:乐优炫彩-双色球", trade_text)  # 检查商品名称正确
     sos.check_order_details()  # 查看订单详情
     od = OrderDetails_leyou(self.driver)
     od.order_details_check()  # 检查订单详情页