Ejemplo n.º 1
0
 def test_UnionLotto_Machine_input_three_times_add_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.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_lexiu(self.driver)
     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, "提交订单失败")
     trade_text = sos.trade_name_text()  # 获取商品名称
     self.assertIn("商品名称:乐秀赢球-双色球", trade_text)  # 检查商品名称正确
     sos.check_order_details()  # 查看订单详情
     od = OrderDetails_lexiu(self.driver)
     od.order_details_check()  # 检查订单详情页