Пример #1
0
 def test_Play_zjq_Add_event(self):
     """验证添加/编辑赛事按钮,支付流程"""
     ha = HomePage_leyou(self.driver)
     hb = PaintBallChooseNumber_leyou(self.driver)
     hb1 = SingleFootChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hc1 = PaintBallConfirm_leyou(self.driver)
     hl = Login_leyou(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.single_foot_link()  ###点击竞彩足球
     hb.Play_f()  ####点击玩法
     hb.Play_zq()  ###点击总进球
     aa = hb1.Paintball_single_zjq_nus_X(4)  ###随机点击4场比赛
     if aa > 0:
         hb.confirm_match()  ###点击已选N场比赛
         hc1.Add_event_rqspf()  ###点击编辑/添加赛事
         mul = hb.Play_fb()  ###读取文本
         self.assertEqual('玩\n法', mul)
         hb.confirm_match()  ###点击已选N场比赛
         hc.submit_order_to_station_owner_button()  ####点击提交给站主
         # hl.new_user_login_tab()  # 点击新登录
         hl.login_leyou()  # 输入账号,密码
         hc.submit_order_to_station_owner_button()  # 点击提交给站主
         hc.confirm_and_pay_button()  # 点击确认支付
Пример #2
0
 def test_Play_dgp_Add_event(self):
     """验证添加/编辑赛事按钮,支付流程"""
     ha = HomePage_leyou(self.driver)
     hb = PaintBallChooseNumber_leyou(self.driver)
     hb1 = SingleFootChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hc1 = SingleFootConfirmLottery_leyou(self.driver)
     hc2 = PaintBallConfirm_leyou(self.driver)
     hl = Login_leyou(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.single_foot_link()  ###点击竞足单关
     hb.Play_f()  ####点击玩法
     hb1.Play_dgp()  ###点击单关配
     sleep(1)
     hb1.Dgp_tan()  ##点击弹框
     aa = hb1.Paintball_single_dgp_nus_X(1)  ###随机点击1场比赛
     if aa > 0:
         hb.confirm_match()  ###点击已选N场比赛
         hc2.Add_event_rqspf()  ###点击编辑/添加赛事
         mul = hb.Play_fb()  ###读取文本
         self.assertEqual('玩\n法', mul)
         hb.confirm_match()  ###点击已选N场比赛
         hc.submit_order_to_station_owner_button()  ####点击提交给站主
         hl.login_leyou()  # 输入账号,密码
         hc.submit_order_to_station_owner_button()  # 点击提交给站主
         hb1.Know_dgp()  ##点击我知道了
         hc2.Times_input_click()  #####点击倍数输入框
         hc2.Times_number(10)  ####点击10倍
         hc.submit_order_to_station_owner_button()  ####点击提交给站主
         # hl.new_user_login_tab()  # 点击新登录
         hc.confirm_and_pay_button()  # 点击确认支付
 def test_edit_event_case(self):
     '''验证投注确认页编辑赛事按钮测试流程'''
     hp = HomePage_leyou(self.driver)
     pbcn = PaintBallChooseNumber_leyou(self.driver)
     sfcn = SingleFootChooseNumber_leyou(self.driver)
     cl = ConfirmLottery_leyou(self.driver)
     pbc = PaintBallConfirm_leyou(self.driver)
     sfcl = SingleFootConfirmLottery_leyou(self.driver)
     l = Login_leyou(self.driver)
     hp.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.single_foot_link()  ##点击竞足
     pbcn.Play_f()  # 选择玩法-
     pbcn.Play_rqspf()  # 选择让球胜平负
     aa = sfcn.jzdg_rqspf_choose(1)  # 选择比赛
     if aa > 0:
         pbcn.confirm_match()  # 点击确认赛事
         pbc.Add_event_rqspf()  # 点击编辑赛事
         bb = sfcn.jzdg_rqspf_edit_event(1)  # 选择1场比赛
         if bb == 1:
             print("只有一场赛事")
             pbcn.confirm_match()  # 点击确认赛事
             text1 = sfcl.lottery_times_text()  # 获取投注倍数文本
             self.assertIn("2注5倍 ", text1)
         if bb == 2:
             pbcn.confirm_match()  # 点击确认赛事
             text1 = sfcl.lottery_times_text()  # 获取投注倍数文本
             self.assertIn("2注5倍 ", text1)
     if aa == 0:
         text = sfcn.Play_dgp_text()
         self.assertIn("单关配", text)