コード例 #1
0
 def test_Lottery_Hand_choose_18_2_case(
         self):  ###################mj20171207
     """手选一注(复式),多注多倍,提交订单"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_lexiu(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  # 点击大乐透链接
     blcn = BigLotteryChooseNum_lexiu(self.driver)
     blcl = BigLotteryConfirmLottery_lexiu(self.driver)
     blcn.l_red_label18()  # 任意选择5个红球
     blcn.l_bule_label2()  # 任意选择2个蓝球
     ulcn = UnionLottoChooseNumber_lexiu(self.driver)
     ulcn.Confirm_button()  # 点击确认选号按钮
     cl = ConfirmLottery_lexiu(self.driver)
     cl.chase_ticket_button()  # 点击追xx期
     blcl.additional_radio_button()  # 点击追加单选按钮
     cl.chase_ticket_button_two()  # 点击追加2期单选按钮
     cl.throw_times_input(3)  # 输入投注倍数
     num1 = cl.lottery_number_text()  # 获取注数
     chase = cl.chase_time_text()  # 获取追号期数
     times = cl.throw_time_text()  # 获取倍数
     self.assertEqual("856823", num1 + chase + times)
     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.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lexiu(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     # 返回首页
     sos.return_home()
     hp.Moveable_float_close()
     # 点击我的彩票,进入我的个人中心页面
     hp.MyTicket_link()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     # 点击个人中心页面右上角的设置,进入设置页面
     mt = MyTicket_lexiu(self.driver)
     mt.setup_link()  # 点击设置按钮
     # 点击设置页面的“退出账户”按钮
     su = SetUp_lexiu(self.driver)
     su.LogOut_button()
コード例 #2
0
 def test_Lottery_Hand_choose_case(self):
     """大乐透手选5个红球2个蓝球购买流程测试"""
     ###点击进入大乐透进入大乐透选号页面###
     hp = HomePage_lexiu(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.Lottery_link()  #点击大乐透链接
     blcn = BigLotteryChooseNum_lexiu(self.driver)
     blcn.l_red_label5()  #任意选择5个红球
     blcn.l_bule_label2()  #任意选择2个蓝球
     ulcn = UnionLottoChooseNumber_lexiu(self.driver)
     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.confirm_and_pay_button()  # 点击“确认并支付”按钮
     '''断言验证提交订单成功'''
     sos = SubmitOrderSuccess_lexiu(self.driver)
     hp.Moveable_float_close()
     text = sos.submit_order_success()
     self.assertEqual("订单提交成功", text, "提交订单失败")
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     # 返回首页
     sos.return_home()
     hp.Moveable_float_close()
     # 点击我的彩票,进入我的个人中心页面
     hp.MyTicket_link()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     # 点击个人中心页面右上角的设置,进入设置页面
     mt = MyTicket_lexiu(self.driver)
     mt.setup_link()  #点击设置按钮
     # 点击设置页面的“退出账户”按钮
     su = SetUp_lexiu(self.driver)
     su.LogOut_button()
コード例 #3
0
 def test_UnionLotto_Machine_choose_one_case(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()  #机选一注
     ulcn.Confirm_button()  #确认选号
     ######进入提交订单页面######
     cl = ConfirmLottery_lexiu(self.driver)
     lottery_number_text = cl.lottery_number_text()
     self.assertIn("1", lottery_number_text)  #检查投注注数为1注
     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.return_home()
     #点击我的彩票,进入我的个人中心页面
     hp.MyTicket_link()
     hp.Moveable_float_close()
     #点击个人中心页面右上角的设置,进入设置页面
     mt = MyTicket_lexiu(self.driver)
     mt.setup_link()  #点击设置
     #点击设置页面的“退出账户”按钮
     su = SetUp_lexiu(self.driver)
     su.LogOut_button()  #退出登录
コード例 #4
0
    def test_UnionLotto_Hand_choose_case(self):
        """双色球手选6个红球1个蓝球购买流程测试"""
        ###点击进入双色球选号页面###
        hp = HomePage_lexiu(self.driver)
        hp.open()
        ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
        hp.Moveable_float_close()
        hp.UnionLotto_link()  #点击双色球链接

        #选号
        ulcn = UnionLottoChooseNumber_lexiu(self.driver)
        ulcn.u_red_label6()  #任意选择6个红球
        ulcn.u_bule_label1()  #任意选择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.confirm_and_pay_button()  # 点击“确认并支付”按钮
        '''断言验证提交订单成功'''
        sos = SubmitOrderSuccess_lexiu(self.driver)
        hp.Moveable_float_close()  # 关闭悬浮窗口
        text = sos.submit_order_success()
        self.assertEqual("订单提交成功", text, "提交订单失败")
        ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
        hp.Moveable_float_close()
        # 返回首页
        sos.return_home()
        # 点击我的彩票,进入我的个人中心页面
        hp.MyTicket_link()
        ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
        hp.Moveable_float_close()
        # 点击个人中心页面右上角的设置,进入设置页面
        mt = MyTicket_lexiu(self.driver)
        mt.setup_link()  #点击设置按钮
        # 点击设置页面的“退出账户”按钮
        su = SetUp_lexiu(self.driver)
        su.LogOut_button()