Beispiel #1
0
 def test_Lottery_information_buy_case(self):
     """进入开奖公告,点击投注双色球,进入双色球投注页面,选1注号码"""
     ha = HomePage(self.driver)
     hl = Login(self.driver)
     hb = UnionLottoChooseNumber(self.driver)
     hc = ConfirmLottery(self.driver)
     hd = PaymetMode(self.driver)
     he = BaofooPayment(self.driver)
     hf = ChooseBank(self.driver)
     hf1 = SubmitOrderSuccess(self.driver)
     hf2 = LessPaySucess(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.submit_order_to_station_owner_button()  # 点击提交给站主
     hl.login()  # 输入账号,密码
     hc.submit_order_to_station_owner_button()  # 点击提交给站主
     hc.confirm_and_pay_button()  # 点击确认支付
     text1 = hf1.submit_order_success()  # 获取提交订单成功文本
     self.assertEqual('订单提交成功', text1)
Beispiel #2
0
 def test_Lottery_information_buy_pause_five_case(self):
     """进入开奖公告,打开双色球开奖详情,点击投注双色球,进入双色球投注页面,选1注号码,在投注确认页,机选5注,修改倍数,期数"""
     ha = HomePage(self.driver)
     hl = Login(self.driver)
     hb = UnionLottoChooseNumber(self.driver)
     hc = ConfirmLottery(self.driver)
     hd = PaymetMode(self.driver)
     he = BaofooPayment(self.driver)
     hf = ChooseBank(self.driver)
     hf1 = SubmitOrderSuccess(self.driver)
     hf2 = LessPaySucess(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()  # 输入账号,密码
     hc.submit_order_to_station_owner_button()  # 点击提交给站主
     hc.confirm_and_pay_button()  # 点击确认支付
     text1 = hf1.submit_order_success()  # 获取提交订单成功文本
     self.assertEqual('订单提交成功', text1)