from element_operate.UnionLotto.UnionLotto_choosenumber import UnionLottoChooseNumber_lelun
from element_operate.UnionLotto.confirm_lottery import ConfirmLottery_lelun
from element_operate.baofoo_payment import BaofooPayment_lelun
from element_operate.choose_bank import ChooseBank_lelun
from element_operate.confirm_pay import ConfirmPay_lelun
from element_operate.homepage import HomePage_lelun
from element_operate.less_pay_sucess import LessPaySucess_lelun
from element_operate.login import Login_lelun
from element_operate.my_ticket import MyTicket_lelun
from element_operate.payment_mode import PaymetMode_lelun
from test_case.Base.mytest import MyTest
from element_operate.UnionLotto.submit_order_sucess import SubmitOrderSuccess_lelun
from time import sleep
from element_operate.UnionLotto.order_details import OrderDetails_lelun
from selenium.webdriver.common.action_chains import ActionChains


class LessPayment_case(MyTest):
    """=单线场景"""
    def test_less_payment_shortfall_case(self):
        '''验证差额支付流程'''
        ###点击进入双色球选号页面###
        hp = HomePage_lelun(self.driver)
        hp.open()
        l=Login_lelun(self.driver)
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        hp.Moveable_float_close()
        hp.UnionLotto_link()#点击双色球链接
        ulcn = UnionLottoChooseNumber_lelun(self.driver)
        ulcn.u_red_label6()  # 任意选择6个红球
        ulcn.u_bule_label1()  # 任意选择1个蓝球
        ulcn.Confirm_button()  # 点击确认选号按钮
        cl = ConfirmLottery_lelun(self.driver)
        cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        l.login_nomoney_lelun()#点击登录
        cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
        pm = PaymetMode_lelun(self.driver)
        mur = pm.Top_up()  ##获取充值成功文本
        self.assertEqual('充值', mur)

    def test_recharge_case(self):
        """验证充值流程"""
        hp = HomePage_lelun(self.driver)
        hb=MyTicket_lelun(self.driver)
        hc=PaymetMode_lelun(self.driver)
        hd=BaofooPayment_lelun(self.driver)
        he=ChooseBank_lelun(self.driver)
        hf=ConfirmPay_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hp.open()
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        hp.Moveable_float_close()
        hp.My_lottery_ticket()##点击我的彩票
        hl.login_lelun()##登录
        hb.Recharge()#点击充值
        hb.Recharge_Money()##点击充值数字按钮
        hb.Next()##点击下一步
        mur = hc.Top_up()  ##获取充值成功文本
        self.assertEqual('充值', mur)

    def test_recharge_input_case(self):
        """验证手动输入金额充值流程"""
        hp = HomePage_lelun(self.driver)
        hb = MyTicket_lelun(self.driver)
        hc = PaymetMode_lelun(self.driver)
        hd = BaofooPayment_lelun(self.driver)
        he = ChooseBank_lelun(self.driver)
        hf = ConfirmPay_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hp.open()
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        hp.Moveable_float_close()
        hp.My_lottery_ticket()  ##点击我的彩票
        hl.login_lelun()  ##登录
        hb.Recharge()  # 点击充值
        hb.Recharge_input(888)###输入888
        hb.Next()  ##点击下一步
        mur = hc.Top_up()  ##获取充值成功文本
        self.assertEqual('充值', mur)

    def test_Login_case(self):
        """验证登录流程"""
        hp = HomePage_lelun(self.driver)
        hb = MyTicket_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hp.open()
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        hp.Moveable_float_close()
        hp.My_lottery_ticket()  ##点击我的彩票
        hl.login_lelun()  ##登录
        mur = hb.Account()
        self.assertEqual("17602882784", mur)

    def test_after_shortfall_case(self):
        '''验证差额支付,复式号码流程'''
        ###点击进入双色球选号页面###
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc= ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2= LessPaySucess_lelun(self.driver)
        ha.open()
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        ha.Moveable_float_close()
        ha.UnionLotto_link()#点击双色球链接
        hb.u_red_label6()  # 任意选择6个红球
        hb.u_bule_label1_too()  # 任意选择2个蓝球
        hb.Confirm_button()  # 点击确认选号按钮
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hl.login_nomoney_lelun()#点击登录
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hc.confirm_and_pay_button()  # 点击“确认并支付”按钮
        mur=hd.Top_up()##获取充值成功文本
        self.assertEqual('充值',mur)

    """def test_one_note_pause_one_shortfall_case(self):
        '''手选一注，确认页机选1注，差额支付流程'''
        ###点击进入双色球选号页面###
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc= ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2= LessPaySucess_lelun(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.machine_choose_one_button()#点击机选一注
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hl.login_nomoney_lelun()#点击登录
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hc.confirm_and_pay_button()  # 点击“确认并支付”按钮
        mur = hd.Top_up()  ##获取充值成功文本
        self.assertEqual('充值', mur)"""

    def test_one_note_five_double_ten_period_shortfall_case(self):
        '''手选一注，1注单式号码，修改倍数5，修改期数10，差额支付流程'''
        ###点击进入双色球选号页面###
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc= ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2= LessPaySucess_lelun(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.chase_ticket_input("10")#输入追10期
        hc.throw_times_input("5")#输入投注倍数为5倍
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hl.login_nomoney_lelun()#点击登录
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hc.confirm_and_pay_button()  # 点击“确认并支付”按钮
        mur = hd.Top_up()  ##获取充值成功文本
        self.assertEqual('充值', mur)

    def test_after_Continue_buy(self):
        """打开追号订单详情，点击继续购买该方案"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd=MyTicket_lelun(self.driver)
        he = OrderDetails_lelun(self.driver)
        hf = SubmitOrderSuccess_lelun(self.driver)
        ha.open()
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        ha.Moveable_float_close()
        ha.My_lottery_ticket()  # 点击我的彩票
        hl.login_lelun()  # 点击登录
        hd.After_nu()##点击追号订单
        hd.After_nu_record()###点击追号记录的订单
        he.Scheme()#点击继续购买该方案
        mur = hc.confirm_num_page_text()
        self.assertEqual('提交订单给站主', mur)
        hc.submit_order_to_station_owner_button()  # 点击提交订单给站主
        hc.confirm_and_pay_button()  # 点击确认支付
        text1 = hf.submit_order_success()  # 获取提交订单成功文本
        self.assertEqual('订单提交成功', text1)

    def test_unionlotto_dantuo_continue_case(self):
        """胆拖选号页面，选择1注号码，在投注确认页面，继续选1注"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        ha.Moveable_float_close()
        ha.UnionLotto_link()  # 点击双色球链接
        hb.DanTuo_mode()  # 选择胆拖模式
        hb.u_red_five_two()  # 红球选取5个胆码2个拖码
        hb.u_bule_one()  # 选取一个蓝球
        hb.Confirm_button()  # 确认选号
        hc.continue_choose_num_button()  ##继续选号
        hb.u_red_five_two()  # 红球选取5个胆码2个拖码
        hb.u_bule_one()  # 选取一个蓝球
        hb.Confirm_button()  # 确认选号
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hl.login_nomoney_lelun()  # 点击登录
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hc.confirm_and_pay_button()  # 点击“确认并支付”按钮
        mur = hd.Top_up()  ##获取充值成功文本
        self.assertEqual('充值', mur)

    def test_Lottery_information_buy_case(self):
        """进入开奖公告,点击投注双色球，进入双色球投注页面，选1注号码"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = SubmitOrderSuccess_lelun(self.driver)
        hf2 = LessPaySucess_lelun(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_lelun()  # 输入账号，密码
        hc.submit_order_to_station_owner_button()  # 点击提交给站主
        hc.confirm_and_pay_button()  # 点击确认支付
        text1 = hf1.submit_order_success()  # 获取提交订单成功文本
        self.assertEqual('订单提交成功', text1)

    '''def test_Lottery_information_buy_pause_one_case(self):
        """进入开奖公告，打开双色球开奖详情，点击投注双色球，进入双色球投注页面，选1注号码，在投注确认页，机选1注"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = SubmitOrderSuccess_lelun(self.driver)
        hf2 = LessPaySucess_lelun(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_one_button()##点击机选1注
        lottery_number_text = hc.lottery_number_text()  # 获取投注注数文本
        self.assertIn("2", lottery_number_text)  # 检查投注注数为1注
        hc.submit_order_to_station_owner_button()  # 点击提交给站主
        hl.login_lelun()  # 输入账号，密码
        hc.submit_order_to_station_owner_button()  # 点击提交给站主
        hc.confirm_and_pay_button()  # 点击确认支付
        text1 = hf1.submit_order_success()  # 获取提交订单成功文本
        self.assertEqual('订单提交成功', text1)'''

    def test_Lottery_information_buy_pause_five_case(self):
        """进入开奖公告，打开双色球开奖详情，点击投注双色球，进入双色球投注页面，选1注号码，在投注确认页，机选5注，修改倍数，期数"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = SubmitOrderSuccess_lelun(self.driver)
        hf2 = LessPaySucess_lelun(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_lelun()  # 输入账号，密码
        hc.submit_order_to_station_owner_button()  # 点击提交给站主
        hc.confirm_and_pay_button()  # 点击确认支付
        text1 = hf1.submit_order_success()  # 获取提交订单成功文本
        self.assertEqual('订单提交成功', text1)

    '''def test_aaa(self):
        """幸运选号"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = SubmitOrderSuccess_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        action = ActionChains(self.driver)
        ha.open()
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        ha.Moveable_float_close()
        ha.Activity_zone()###点击幸运选号
        hb.Lucky_number()##点击幸运选号
        hc.Choose_color()#点击选择彩种
        hc.Lucky_unionlotto(action)
        hc.Complete()##点击完成
        hc.Choose_note()#点击选择注数
        sleep(5)
        hc.Complete()##点击完成'''


b72f8c6544bf9f2b27b76dc7bcb1282b5d567472
<mask token>


class LessPayment_case(MyTest):
    <mask token>

    def test_less_payment_shortfall_case(self):
        """验证差额支付流程"""
        hp = HomePage_lelun(self.driver)
        hp.open()
        l = Login_lelun(self.driver)
        hp.Moveable_float_close()
        hp.UnionLotto_link()
        ulcn = UnionLottoChooseNumber_lelun(self.driver)
        ulcn.u_red_label6()
        ulcn.u_bule_label1()
        ulcn.Confirm_button()
        cl = ConfirmLottery_lelun(self.driver)
        cl.submit_order_to_station_owner_button()
        l.login_nomoney_lelun()
        cl.submit_order_to_station_owner_button()
        cl.confirm_and_pay_button()
        pm = PaymetMode_lelun(self.driver)
        mur = pm.Top_up()
        self.assertEqual('充值', mur)
    <mask token>

    def test_recharge_input_case(self):
        """验证手动输入金额充值流程"""
        hp = HomePage_lelun(self.driver)
        hb = MyTicket_lelun(self.driver)
        hc = PaymetMode_lelun(self.driver)
        hd = BaofooPayment_lelun(self.driver)
        he = ChooseBank_lelun(self.driver)
        hf = ConfirmPay_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hp.open()
        hp.Moveable_float_close()
        hp.My_lottery_ticket()
        hl.login_lelun()
        hb.Recharge()
        hb.Recharge_input(888)
        hb.Next()
        mur = hc.Top_up()
        self.assertEqual('充值', mur)
    <mask token>

    def test_after_shortfall_case(self):
        """验证差额支付,复式号码流程"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.UnionLotto_link()
        hb.u_red_label6()
        hb.u_bule_label1_too()
        hb.Confirm_button()
        hc.submit_order_to_station_owner_button()
        hl.login_nomoney_lelun()
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        mur = hd.Top_up()
        self.assertEqual('充值', mur)
    <mask token>

    def test_one_note_five_double_ten_period_shortfall_case(self):
        """手选一注，1注单式号码，修改倍数5，修改期数10，差额支付流程"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.UnionLotto_link()
        hb.u_red_label6()
        hb.u_bule_label1()
        hb.Confirm_button()
        hc.chase_ticket_input('10')
        hc.throw_times_input('5')
        hc.submit_order_to_station_owner_button()
        hl.login_nomoney_lelun()
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        mur = hd.Top_up()
        self.assertEqual('充值', mur)
    <mask token>
    <mask token>

    def test_Lottery_information_buy_case(self):
        """进入开奖公告,点击投注双色球，进入双色球投注页面，选1注号码"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = SubmitOrderSuccess_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.Lottery_information()
        hb.Lottery_information_unionlotto()
        hc.Unionlotto_History_buy()
        hc.Buy_unionlotto()
        hb.u_red_label6()
        hb.u_bule_label1()
        hb.Confirm_button()
        hc.submit_order_to_station_owner_button()
        hl.login_lelun()
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        text1 = hf1.submit_order_success()
        self.assertEqual('订单提交成功', text1)
    <mask token>
    <mask token>
    <mask token>

<mask token>


class LessPayment_case(MyTest):
    <mask token>

    def test_less_payment_shortfall_case(self):
        """验证差额支付流程"""
        hp = HomePage_lelun(self.driver)
        hp.open()
        l = Login_lelun(self.driver)
        hp.Moveable_float_close()
        hp.UnionLotto_link()
        ulcn = UnionLottoChooseNumber_lelun(self.driver)
        ulcn.u_red_label6()
        ulcn.u_bule_label1()
        ulcn.Confirm_button()
        cl = ConfirmLottery_lelun(self.driver)
        cl.submit_order_to_station_owner_button()
        l.login_nomoney_lelun()
        cl.submit_order_to_station_owner_button()
        cl.confirm_and_pay_button()
        pm = PaymetMode_lelun(self.driver)
        mur = pm.Top_up()
        self.assertEqual('充值', mur)
    <mask token>

    def test_recharge_input_case(self):
        """验证手动输入金额充值流程"""
        hp = HomePage_lelun(self.driver)
        hb = MyTicket_lelun(self.driver)
        hc = PaymetMode_lelun(self.driver)
        hd = BaofooPayment_lelun(self.driver)
        he = ChooseBank_lelun(self.driver)
        hf = ConfirmPay_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hp.open()
        hp.Moveable_float_close()
        hp.My_lottery_ticket()
        hl.login_lelun()
        hb.Recharge()
        hb.Recharge_input(888)
        hb.Next()
        mur = hc.Top_up()
        self.assertEqual('充值', mur)
    <mask token>

    def test_after_shortfall_case(self):
        """验证差额支付,复式号码流程"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.UnionLotto_link()
        hb.u_red_label6()
        hb.u_bule_label1_too()
        hb.Confirm_button()
        hc.submit_order_to_station_owner_button()
        hl.login_nomoney_lelun()
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        mur = hd.Top_up()
        self.assertEqual('充值', mur)
    <mask token>

    def test_one_note_five_double_ten_period_shortfall_case(self):
        """手选一注，1注单式号码，修改倍数5，修改期数10，差额支付流程"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.UnionLotto_link()
        hb.u_red_label6()
        hb.u_bule_label1()
        hb.Confirm_button()
        hc.chase_ticket_input('10')
        hc.throw_times_input('5')
        hc.submit_order_to_station_owner_button()
        hl.login_nomoney_lelun()
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        mur = hd.Top_up()
        self.assertEqual('充值', mur)

    def test_after_Continue_buy(self):
        """打开追号订单详情，点击继续购买该方案"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = MyTicket_lelun(self.driver)
        he = OrderDetails_lelun(self.driver)
        hf = SubmitOrderSuccess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.My_lottery_ticket()
        hl.login_lelun()
        hd.After_nu()
        hd.After_nu_record()
        he.Scheme()
        mur = hc.confirm_num_page_text()
        self.assertEqual('提交订单给站主', mur)
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        text1 = hf.submit_order_success()
        self.assertEqual('订单提交成功', text1)
    <mask token>

    def test_Lottery_information_buy_case(self):
        """进入开奖公告,点击投注双色球，进入双色球投注页面，选1注号码"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = SubmitOrderSuccess_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.Lottery_information()
        hb.Lottery_information_unionlotto()
        hc.Unionlotto_History_buy()
        hc.Buy_unionlotto()
        hb.u_red_label6()
        hb.u_bule_label1()
        hb.Confirm_button()
        hc.submit_order_to_station_owner_button()
        hl.login_lelun()
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        text1 = hf1.submit_order_success()
        self.assertEqual('订单提交成功', text1)
    <mask token>
    <mask token>
    <mask token>

<mask token>


class LessPayment_case(MyTest):
    <mask token>

    def test_less_payment_shortfall_case(self):
        """验证差额支付流程"""
        hp = HomePage_lelun(self.driver)
        hp.open()
        l = Login_lelun(self.driver)
        hp.Moveable_float_close()
        hp.UnionLotto_link()
        ulcn = UnionLottoChooseNumber_lelun(self.driver)
        ulcn.u_red_label6()
        ulcn.u_bule_label1()
        ulcn.Confirm_button()
        cl = ConfirmLottery_lelun(self.driver)
        cl.submit_order_to_station_owner_button()
        l.login_nomoney_lelun()
        cl.submit_order_to_station_owner_button()
        cl.confirm_and_pay_button()
        pm = PaymetMode_lelun(self.driver)
        mur = pm.Top_up()
        self.assertEqual('充值', mur)

    def test_recharge_case(self):
        """验证充值流程"""
        hp = HomePage_lelun(self.driver)
        hb = MyTicket_lelun(self.driver)
        hc = PaymetMode_lelun(self.driver)
        hd = BaofooPayment_lelun(self.driver)
        he = ChooseBank_lelun(self.driver)
        hf = ConfirmPay_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hp.open()
        hp.Moveable_float_close()
        hp.My_lottery_ticket()
        hl.login_lelun()
        hb.Recharge()
        hb.Recharge_Money()
        hb.Next()
        mur = hc.Top_up()
        self.assertEqual('充值', mur)

    def test_recharge_input_case(self):
        """验证手动输入金额充值流程"""
        hp = HomePage_lelun(self.driver)
        hb = MyTicket_lelun(self.driver)
        hc = PaymetMode_lelun(self.driver)
        hd = BaofooPayment_lelun(self.driver)
        he = ChooseBank_lelun(self.driver)
        hf = ConfirmPay_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hp.open()
        hp.Moveable_float_close()
        hp.My_lottery_ticket()
        hl.login_lelun()
        hb.Recharge()
        hb.Recharge_input(888)
        hb.Next()
        mur = hc.Top_up()
        self.assertEqual('充值', mur)
    <mask token>

    def test_after_shortfall_case(self):
        """验证差额支付,复式号码流程"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.UnionLotto_link()
        hb.u_red_label6()
        hb.u_bule_label1_too()
        hb.Confirm_button()
        hc.submit_order_to_station_owner_button()
        hl.login_nomoney_lelun()
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        mur = hd.Top_up()
        self.assertEqual('充值', mur)
    <mask token>

    def test_one_note_five_double_ten_period_shortfall_case(self):
        """手选一注，1注单式号码，修改倍数5，修改期数10，差额支付流程"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.UnionLotto_link()
        hb.u_red_label6()
        hb.u_bule_label1()
        hb.Confirm_button()
        hc.chase_ticket_input('10')
        hc.throw_times_input('5')
        hc.submit_order_to_station_owner_button()
        hl.login_nomoney_lelun()
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        mur = hd.Top_up()
        self.assertEqual('充值', mur)

    def test_after_Continue_buy(self):
        """打开追号订单详情，点击继续购买该方案"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = MyTicket_lelun(self.driver)
        he = OrderDetails_lelun(self.driver)
        hf = SubmitOrderSuccess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.My_lottery_ticket()
        hl.login_lelun()
        hd.After_nu()
        hd.After_nu_record()
        he.Scheme()
        mur = hc.confirm_num_page_text()
        self.assertEqual('提交订单给站主', mur)
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        text1 = hf.submit_order_success()
        self.assertEqual('订单提交成功', text1)

    def test_unionlotto_dantuo_continue_case(self):
        """胆拖选号页面，选择1注号码，在投注确认页面，继续选1注"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.UnionLotto_link()
        hb.DanTuo_mode()
        hb.u_red_five_two()
        hb.u_bule_one()
        hb.Confirm_button()
        hc.continue_choose_num_button()
        hb.u_red_five_two()
        hb.u_bule_one()
        hb.Confirm_button()
        hc.submit_order_to_station_owner_button()
        hl.login_nomoney_lelun()
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        mur = hd.Top_up()
        self.assertEqual('充值', mur)

    def test_Lottery_information_buy_case(self):
        """进入开奖公告,点击投注双色球，进入双色球投注页面，选1注号码"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = SubmitOrderSuccess_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.Lottery_information()
        hb.Lottery_information_unionlotto()
        hc.Unionlotto_History_buy()
        hc.Buy_unionlotto()
        hb.u_red_label6()
        hb.u_bule_label1()
        hb.Confirm_button()
        hc.submit_order_to_station_owner_button()
        hl.login_lelun()
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        text1 = hf1.submit_order_success()
        self.assertEqual('订单提交成功', text1)
    <mask token>

    def test_Lottery_information_buy_pause_five_case(self):
        """进入开奖公告，打开双色球开奖详情，点击投注双色球，进入双色球投注页面，选1注号码，在投注确认页，机选5注，修改倍数，期数"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = SubmitOrderSuccess_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.Lottery_information()
        hb.Lottery_information_unionlotto()
        hc.Unionlotto_History_buy()
        hc.Buy_unionlotto()
        hb.u_red_label6()
        hb.u_bule_label1()
        hb.Confirm_button()
        hc.machine_choose_five_button()
        hc.chase_ticket_input('4')
        hc.throw_times_input('3')
        lottery_number_text = hc.lottery_number_text()
        self.assertIn('6', lottery_number_text)
        chase_time_text = hc.chase_time_text()
        self.assertIn('4', chase_time_text)
        throw_times = hc.throw_time_text()
        self.assertIn('3', throw_times)
        hc.submit_order_to_station_owner_button()
        hl.login_lelun()
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        text1 = hf1.submit_order_success()
        self.assertEqual('订单提交成功', text1)
    <mask token>

from element_operate.UnionLotto.UnionLotto_choosenumber import UnionLottoChooseNumber_lelun
from element_operate.UnionLotto.confirm_lottery import ConfirmLottery_lelun
from element_operate.baofoo_payment import BaofooPayment_lelun
from element_operate.choose_bank import ChooseBank_lelun
from element_operate.confirm_pay import ConfirmPay_lelun
from element_operate.homepage import HomePage_lelun
from element_operate.less_pay_sucess import LessPaySucess_lelun
from element_operate.login import Login_lelun
from element_operate.my_ticket import MyTicket_lelun
from element_operate.payment_mode import PaymetMode_lelun
from test_case.Base.mytest import MyTest
from element_operate.UnionLotto.submit_order_sucess import SubmitOrderSuccess_lelun
from time import sleep
from element_operate.UnionLotto.order_details import OrderDetails_lelun
from selenium.webdriver.common.action_chains import ActionChains


class LessPayment_case(MyTest):
    """=单线场景"""

    def test_less_payment_shortfall_case(self):
        """验证差额支付流程"""
        hp = HomePage_lelun(self.driver)
        hp.open()
        l = Login_lelun(self.driver)
        hp.Moveable_float_close()
        hp.UnionLotto_link()
        ulcn = UnionLottoChooseNumber_lelun(self.driver)
        ulcn.u_red_label6()
        ulcn.u_bule_label1()
        ulcn.Confirm_button()
        cl = ConfirmLottery_lelun(self.driver)
        cl.submit_order_to_station_owner_button()
        l.login_nomoney_lelun()
        cl.submit_order_to_station_owner_button()
        cl.confirm_and_pay_button()
        pm = PaymetMode_lelun(self.driver)
        mur = pm.Top_up()
        self.assertEqual('充值', mur)

    def test_recharge_case(self):
        """验证充值流程"""
        hp = HomePage_lelun(self.driver)
        hb = MyTicket_lelun(self.driver)
        hc = PaymetMode_lelun(self.driver)
        hd = BaofooPayment_lelun(self.driver)
        he = ChooseBank_lelun(self.driver)
        hf = ConfirmPay_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hp.open()
        hp.Moveable_float_close()
        hp.My_lottery_ticket()
        hl.login_lelun()
        hb.Recharge()
        hb.Recharge_Money()
        hb.Next()
        mur = hc.Top_up()
        self.assertEqual('充值', mur)

    def test_recharge_input_case(self):
        """验证手动输入金额充值流程"""
        hp = HomePage_lelun(self.driver)
        hb = MyTicket_lelun(self.driver)
        hc = PaymetMode_lelun(self.driver)
        hd = BaofooPayment_lelun(self.driver)
        he = ChooseBank_lelun(self.driver)
        hf = ConfirmPay_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hp.open()
        hp.Moveable_float_close()
        hp.My_lottery_ticket()
        hl.login_lelun()
        hb.Recharge()
        hb.Recharge_input(888)
        hb.Next()
        mur = hc.Top_up()
        self.assertEqual('充值', mur)

    def test_Login_case(self):
        """验证登录流程"""
        hp = HomePage_lelun(self.driver)
        hb = MyTicket_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hp.open()
        hp.Moveable_float_close()
        hp.My_lottery_ticket()
        hl.login_lelun()
        mur = hb.Account()
        self.assertEqual('17602882784', mur)

    def test_after_shortfall_case(self):
        """验证差额支付,复式号码流程"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.UnionLotto_link()
        hb.u_red_label6()
        hb.u_bule_label1_too()
        hb.Confirm_button()
        hc.submit_order_to_station_owner_button()
        hl.login_nomoney_lelun()
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        mur = hd.Top_up()
        self.assertEqual('充值', mur)
    """def test_one_note_pause_one_shortfall_case(self):
        '''手选一注，确认页机选1注，差额支付流程'''
        ###点击进入双色球选号页面###
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc= ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2= LessPaySucess_lelun(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.machine_choose_one_button()#点击机选一注
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hl.login_nomoney_lelun()#点击登录
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hc.confirm_and_pay_button()  # 点击“确认并支付”按钮
        mur = hd.Top_up()  ##获取充值成功文本
        self.assertEqual('充值', mur)"""

    def test_one_note_five_double_ten_period_shortfall_case(self):
        """手选一注，1注单式号码，修改倍数5，修改期数10，差额支付流程"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.UnionLotto_link()
        hb.u_red_label6()
        hb.u_bule_label1()
        hb.Confirm_button()
        hc.chase_ticket_input('10')
        hc.throw_times_input('5')
        hc.submit_order_to_station_owner_button()
        hl.login_nomoney_lelun()
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        mur = hd.Top_up()
        self.assertEqual('充值', mur)

    def test_after_Continue_buy(self):
        """打开追号订单详情，点击继续购买该方案"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = MyTicket_lelun(self.driver)
        he = OrderDetails_lelun(self.driver)
        hf = SubmitOrderSuccess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.My_lottery_ticket()
        hl.login_lelun()
        hd.After_nu()
        hd.After_nu_record()
        he.Scheme()
        mur = hc.confirm_num_page_text()
        self.assertEqual('提交订单给站主', mur)
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        text1 = hf.submit_order_success()
        self.assertEqual('订单提交成功', text1)

    def test_unionlotto_dantuo_continue_case(self):
        """胆拖选号页面，选择1注号码，在投注确认页面，继续选1注"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.UnionLotto_link()
        hb.DanTuo_mode()
        hb.u_red_five_two()
        hb.u_bule_one()
        hb.Confirm_button()
        hc.continue_choose_num_button()
        hb.u_red_five_two()
        hb.u_bule_one()
        hb.Confirm_button()
        hc.submit_order_to_station_owner_button()
        hl.login_nomoney_lelun()
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        mur = hd.Top_up()
        self.assertEqual('充值', mur)

    def test_Lottery_information_buy_case(self):
        """进入开奖公告,点击投注双色球，进入双色球投注页面，选1注号码"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = SubmitOrderSuccess_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.Lottery_information()
        hb.Lottery_information_unionlotto()
        hc.Unionlotto_History_buy()
        hc.Buy_unionlotto()
        hb.u_red_label6()
        hb.u_bule_label1()
        hb.Confirm_button()
        hc.submit_order_to_station_owner_button()
        hl.login_lelun()
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        text1 = hf1.submit_order_success()
        self.assertEqual('订单提交成功', text1)
    """def test_Lottery_information_buy_pause_one_case(self):
        ""\"进入开奖公告，打开双色球开奖详情，点击投注双色球，进入双色球投注页面，选1注号码，在投注确认页，机选1注""\"
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = SubmitOrderSuccess_lelun(self.driver)
        hf2 = LessPaySucess_lelun(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_one_button()##点击机选1注
        lottery_number_text = hc.lottery_number_text()  # 获取投注注数文本
        self.assertIn("2", lottery_number_text)  # 检查投注注数为1注
        hc.submit_order_to_station_owner_button()  # 点击提交给站主
        hl.login_lelun()  # 输入账号，密码
        hc.submit_order_to_station_owner_button()  # 点击提交给站主
        hc.confirm_and_pay_button()  # 点击确认支付
        text1 = hf1.submit_order_success()  # 获取提交订单成功文本
        self.assertEqual('订单提交成功', text1)"""

    def test_Lottery_information_buy_pause_five_case(self):
        """进入开奖公告，打开双色球开奖详情，点击投注双色球，进入双色球投注页面，选1注号码，在投注确认页，机选5注，修改倍数，期数"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = SubmitOrderSuccess_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ha.Moveable_float_close()
        ha.Lottery_information()
        hb.Lottery_information_unionlotto()
        hc.Unionlotto_History_buy()
        hc.Buy_unionlotto()
        hb.u_red_label6()
        hb.u_bule_label1()
        hb.Confirm_button()
        hc.machine_choose_five_button()
        hc.chase_ticket_input('4')
        hc.throw_times_input('3')
        lottery_number_text = hc.lottery_number_text()
        self.assertIn('6', lottery_number_text)
        chase_time_text = hc.chase_time_text()
        self.assertIn('4', chase_time_text)
        throw_times = hc.throw_time_text()
        self.assertIn('3', throw_times)
        hc.submit_order_to_station_owner_button()
        hl.login_lelun()
        hc.submit_order_to_station_owner_button()
        hc.confirm_and_pay_button()
        text1 = hf1.submit_order_success()
        self.assertEqual('订单提交成功', text1)
    """def test_aaa(self):
        ""\"幸运选号""\"
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = SubmitOrderSuccess_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        action = ActionChains(self.driver)
        ha.open()
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        ha.Moveable_float_close()
        ha.Activity_zone()###点击幸运选号
        hb.Lucky_number()##点击幸运选号
        hc.Choose_color()#点击选择彩种
        hc.Lucky_unionlotto(action)
        hc.Complete()##点击完成
        hc.Choose_note()#点击选择注数
        sleep(5)
        hc.Complete()##点击完成"""

from element_operate.UnionLotto.UnionLotto_choosenumber import UnionLottoChooseNumber_lelun
from element_operate.UnionLotto.confirm_lottery import ConfirmLottery_lelun
from element_operate.baofoo_payment import BaofooPayment_lelun
from element_operate.choose_bank import ChooseBank_lelun
from element_operate.confirm_pay import ConfirmPay_lelun
from element_operate.homepage import HomePage_lelun
from element_operate.less_pay_sucess import LessPaySucess_lelun
from element_operate.login import Login_lelun
from element_operate.my_ticket import MyTicket_lelun
from element_operate.payment_mode import PaymetMode_lelun
from test_case.Base.mytest import MyTest
from element_operate.UnionLotto.submit_order_sucess import SubmitOrderSuccess_lelun
from time import sleep
from element_operate.UnionLotto.order_details import OrderDetails_lelun
from selenium.webdriver.common.action_chains import ActionChains


class LessPayment_case(MyTest):
    """=单线场景"""
    def test_less_payment_shortfall_case(self):
        '''验证差额支付流程'''
        ###点击进入双色球选号页面###
        hp = HomePage_lelun(self.driver)
        hp.open()
        l=Login_lelun(self.driver)
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        hp.Moveable_float_close()
        hp.UnionLotto_link()#点击双色球链接
        ulcn = UnionLottoChooseNumber_lelun(self.driver)
        ulcn.u_red_label6()  # 任意选择6个红球
        ulcn.u_bule_label1()  # 任意选择1个蓝球
        ulcn.Confirm_button()  # 点击确认选号按钮
        cl = ConfirmLottery_lelun(self.driver)
        cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        l.login_nomoney_lelun()#点击登录
        cl.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        cl.confirm_and_pay_button()  # 点击“确认并支付”按钮
        pm = PaymetMode_lelun(self.driver)
        mur = pm.Top_up()  ##获取充值成功文本
        self.assertEqual('充值', mur)

    def test_recharge_case(self):
        """验证充值流程"""
        hp = HomePage_lelun(self.driver)
        hb=MyTicket_lelun(self.driver)
        hc=PaymetMode_lelun(self.driver)
        hd=BaofooPayment_lelun(self.driver)
        he=ChooseBank_lelun(self.driver)
        hf=ConfirmPay_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hp.open()
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        hp.Moveable_float_close()
        hp.My_lottery_ticket()##点击我的彩票
        hl.login_lelun()##登录
        hb.Recharge()#点击充值
        hb.Recharge_Money()##点击充值数字按钮
        hb.Next()##点击下一步
        mur = hc.Top_up()  ##获取充值成功文本
        self.assertEqual('充值', mur)

    def test_recharge_input_case(self):
        """验证手动输入金额充值流程"""
        hp = HomePage_lelun(self.driver)
        hb = MyTicket_lelun(self.driver)
        hc = PaymetMode_lelun(self.driver)
        hd = BaofooPayment_lelun(self.driver)
        he = ChooseBank_lelun(self.driver)
        hf = ConfirmPay_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hp.open()
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        hp.Moveable_float_close()
        hp.My_lottery_ticket()  ##点击我的彩票
        hl.login_lelun()  ##登录
        hb.Recharge()  # 点击充值
        hb.Recharge_input(888)###输入888
        hb.Next()  ##点击下一步
        mur = hc.Top_up()  ##获取充值成功文本
        self.assertEqual('充值', mur)

    def test_Login_case(self):
        """验证登录流程"""
        hp = HomePage_lelun(self.driver)
        hb = MyTicket_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hp.open()
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        hp.Moveable_float_close()
        hp.My_lottery_ticket()  ##点击我的彩票
        hl.login_lelun()  ##登录
        mur = hb.Account()
        self.assertEqual("17602882784", mur)

    def test_after_shortfall_case(self):
        '''验证差额支付,复式号码流程'''
        ###点击进入双色球选号页面###
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc= ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2= LessPaySucess_lelun(self.driver)
        ha.open()
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        ha.Moveable_float_close()
        ha.UnionLotto_link()#点击双色球链接
        hb.u_red_label6()  # 任意选择6个红球
        hb.u_bule_label1_too()  # 任意选择2个蓝球
        hb.Confirm_button()  # 点击确认选号按钮
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hl.login_nomoney_lelun()#点击登录
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hc.confirm_and_pay_button()  # 点击“确认并支付”按钮
        mur=hd.Top_up()##获取充值成功文本
        self.assertEqual('充值',mur)

    """def test_one_note_pause_one_shortfall_case(self):
        '''手选一注，确认页机选1注，差额支付流程'''
        ###点击进入双色球选号页面###
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc= ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2= LessPaySucess_lelun(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.machine_choose_one_button()#点击机选一注
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hl.login_nomoney_lelun()#点击登录
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hc.confirm_and_pay_button()  # 点击“确认并支付”按钮
        mur = hd.Top_up()  ##获取充值成功文本
        self.assertEqual('充值', mur)"""

    def test_one_note_five_double_ten_period_shortfall_case(self):
        '''手选一注，1注单式号码，修改倍数5，修改期数10，差额支付流程'''
        ###点击进入双色球选号页面###
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc= ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2= LessPaySucess_lelun(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.chase_ticket_input("10")#输入追10期
        hc.throw_times_input("5")#输入投注倍数为5倍
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hl.login_nomoney_lelun()#点击登录
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hc.confirm_and_pay_button()  # 点击“确认并支付”按钮
        mur = hd.Top_up()  ##获取充值成功文本
        self.assertEqual('充值', mur)

    def test_after_Continue_buy(self):
        """打开追号订单详情，点击继续购买该方案"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd=MyTicket_lelun(self.driver)
        he = OrderDetails_lelun(self.driver)
        hf = SubmitOrderSuccess_lelun(self.driver)
        ha.open()
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        ha.Moveable_float_close()
        ha.My_lottery_ticket()  # 点击我的彩票
        hl.login_lelun()  # 点击登录
        hd.After_nu()##点击追号订单
        hd.After_nu_record()###点击追号记录的订单
        he.Scheme()#点击继续购买该方案
        mur = hc.confirm_num_page_text()
        self.assertEqual('提交订单给站主', mur)
        hc.submit_order_to_station_owner_button()  # 点击提交订单给站主
        hc.confirm_and_pay_button()  # 点击确认支付
        text1 = hf.submit_order_success()  # 获取提交订单成功文本
        self.assertEqual('订单提交成功', text1)

    def test_unionlotto_dantuo_continue_case(self):
        """胆拖选号页面，选择1注号码，在投注确认页面，继续选1注"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = ConfirmPay_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        ha.open()
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        ha.Moveable_float_close()
        ha.UnionLotto_link()  # 点击双色球链接
        hb.DanTuo_mode()  # 选择胆拖模式
        hb.u_red_five_two()  # 红球选取5个胆码2个拖码
        hb.u_bule_one()  # 选取一个蓝球
        hb.Confirm_button()  # 确认选号
        hc.continue_choose_num_button()  ##继续选号
        hb.u_red_five_two()  # 红球选取5个胆码2个拖码
        hb.u_bule_one()  # 选取一个蓝球
        hb.Confirm_button()  # 确认选号
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hl.login_nomoney_lelun()  # 点击登录
        hc.submit_order_to_station_owner_button()  # 点击“提交订单给站主”按钮
        hc.confirm_and_pay_button()  # 点击“确认并支付”按钮
        mur = hd.Top_up()  ##获取充值成功文本
        self.assertEqual('充值', mur)

    def test_Lottery_information_buy_case(self):
        """进入开奖公告,点击投注双色球，进入双色球投注页面，选1注号码"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = SubmitOrderSuccess_lelun(self.driver)
        hf2 = LessPaySucess_lelun(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_lelun()  # 输入账号，密码
        hc.submit_order_to_station_owner_button()  # 点击提交给站主
        hc.confirm_and_pay_button()  # 点击确认支付
        text1 = hf1.submit_order_success()  # 获取提交订单成功文本
        self.assertEqual('订单提交成功', text1)

    '''def test_Lottery_information_buy_pause_one_case(self):
        """进入开奖公告，打开双色球开奖详情，点击投注双色球，进入双色球投注页面，选1注号码，在投注确认页，机选1注"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = SubmitOrderSuccess_lelun(self.driver)
        hf2 = LessPaySucess_lelun(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_one_button()##点击机选1注
        lottery_number_text = hc.lottery_number_text()  # 获取投注注数文本
        self.assertIn("2", lottery_number_text)  # 检查投注注数为1注
        hc.submit_order_to_station_owner_button()  # 点击提交给站主
        hl.login_lelun()  # 输入账号，密码
        hc.submit_order_to_station_owner_button()  # 点击提交给站主
        hc.confirm_and_pay_button()  # 点击确认支付
        text1 = hf1.submit_order_success()  # 获取提交订单成功文本
        self.assertEqual('订单提交成功', text1)'''

    def test_Lottery_information_buy_pause_five_case(self):
        """进入开奖公告，打开双色球开奖详情，点击投注双色球，进入双色球投注页面，选1注号码，在投注确认页，机选5注，修改倍数，期数"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = SubmitOrderSuccess_lelun(self.driver)
        hf2 = LessPaySucess_lelun(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_lelun()  # 输入账号，密码
        hc.submit_order_to_station_owner_button()  # 点击提交给站主
        hc.confirm_and_pay_button()  # 点击确认支付
        text1 = hf1.submit_order_success()  # 获取提交订单成功文本
        self.assertEqual('订单提交成功', text1)

    '''def test_aaa(self):
        """幸运选号"""
        ha = HomePage_lelun(self.driver)
        hl = Login_lelun(self.driver)
        hb = UnionLottoChooseNumber_lelun(self.driver)
        hc = ConfirmLottery_lelun(self.driver)
        hd = PaymetMode_lelun(self.driver)
        he = BaofooPayment_lelun(self.driver)
        hf = ChooseBank_lelun(self.driver)
        hf1 = SubmitOrderSuccess_lelun(self.driver)
        hf2 = LessPaySucess_lelun(self.driver)
        action = ActionChains(self.driver)
        ha.open()
        ######判断是否出现浮层弹框，如果出现浮层点击X，然后执行下一步操作
        ha.Moveable_float_close()
        ha.Activity_zone()###点击幸运选号
        hb.Lucky_number()##点击幸运选号
        hc.Choose_color()#点击选择彩种
        hc.Lucky_unionlotto(action)
        hc.Complete()##点击完成
        hc.Choose_note()#点击选择注数
        sleep(5)
        hc.Complete()##点击完成'''

