def test_many_lottery_ckick_x_once_case(self):
     '''在投注确认页面,多注号码,点击左边X按钮,投注号码减少一注'''
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     l = Login(self.driver)
     hp.My_lottery_ticket()  # 点击我的彩票
     l.login()  # 点击登录
     sos = SubmitOrderSuccess(self.driver)
     hp.homepage_link()  # 点击首页
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum(self.driver)
     blcl = BigLotteryConfirmLottery(self.driver)
     cl = ConfirmLottery(self.driver)
     od = OrderDetails(self.driver)
     ulcn = UnionLottoChooseNumber(self.driver)
     ulcn.machine_choose_button()#点击机选按钮
     ulcn.machine_choose_five_button()#点击机选5注
     sleep(5)
     num = cl.event_count()  # 获取总共有多少注
     cl.Del_x() #点击单个删除x
     num1 = cl.lottery_number_text()  # 获取注数
     self.assertIn("4", num1)
     cl.submit_order_to_station_owner_button()  # 点击提交订单给站主
     cl.confirm_and_pay_button()  # 点击确认并支付
     hp.Moveable_float_close()  # 如果出现浮层弹框,关闭
     text = sos.submit_order_success()  # 获取页面“订单提交成功”文本
     self.assertEqual("订单提交成功", text)
     hp.Moveable_float_close()  # 如果出现浮层弹框,关闭
     trade_name = sos.trade_name_text()  # 获取页面商品名称文本
     self.assertIn("商品名称:乐米彩票-大乐透", trade_name)
 def test_UnionLotto_unitary_del_X(self):
     """左边X按钮,能够删除所选号码"""
     ha = HomePage(self.driver)
     hb = UnionLottoChooseNumber(self.driver)
     hc = ConfirmLottery(self.driver)
     hc1 = PaintBallChooseNumber(self.driver)
     hd = PaintBallConfirm(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.Del_x()  ##点击左侧X按钮
     mur1 = hc1.Play_fb()
     self.assertEqual('玩\n法', mur1)
 def test_UnionLotto_unitary_many_note_del_X(self):
     """左边X按钮,能够删除所选号码"""
     ha = HomePage(self.driver)
     hb = UnionLottoChooseNumber(self.driver)
     hc = ConfirmLottery(self.driver)
     hd = PaintBallConfirm(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()