def test_Lottery_Machine_cancel_pay(self):
     '''测试提交订单页确认支付弹窗的x按钮'''
     hp = HomePage_lexiu(self.driver)
     hp.open()
     hp.Moveable_float_close()  # 关闭悬浮窗口
     hp.Lottery_link()  # 点击大乐透链接
     ulcn = UnionLottoChooseNumber_lexiu(self.driver)
     ulcn.machine_choose_button()  # 点击机选按钮
     ulcn.machine_choose_one_button()  # 点击机选一注
     ulcn.Confirm_button()  # 点击确认选号按钮
     cl = ConfirmLottery_lexiu(self.driver)
     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.cancel_pay_button()  #确认支付页点击x按钮
     '''断言验证取消支付成功'''
     text = cl.confirm_num_page_text()
     self.assertEqual("提交订单给站主", text)
     print("我已放弃删除,回到了" + text + "页")
示例#2
0
 def test_UnionLotton_Machine_cancel_pay(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_one_button()  # 机选1注
     ulcn.Confirm_button()  # 确认选号
     cl = ConfirmLottery_lexiu(self.driver)
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     #####用户登录######
     l = Login_lexiu(self.driver)
     l.login_lexiu()
     cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
     cl.cancel_pay_button()  #点击取消支付x按钮
     '''断言验证取消支付成功'''
     text = cl.confirm_num_page_text()
     self.assertEqual("提交订单给站主", text)
     print("我已放弃删除,回到了" + text + "页")