Ejemplo n.º 1
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, "提交订单失败")
Ejemplo n.º 2
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, "提交订单失败")
 def test_UnionLotto_many_pause(self):
     """多期机选"""
     ha = HomePage_lelun(self.driver)
     hb = UnionLottoChooseNumber_lelun(self.driver)
     hc = ConfirmLottery_lelun(self.driver)
     hl = Login_lelun(self.driver)
     hd = SubmitOrderSuccess_lelun(self.driver)
     he = OrderDetails_lelun(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.My_lottery_ticket()  ##点击我的彩票
     hl.login_lelun()  ##登录
     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()  # 点击确认支付