コード例 #1
0
 def test_delete_one_event_case(self):
     """验证单个删除赛事X按钮,流程测试"""
     ha = HomePage_leyou(self.driver)
     hb = PaintBallChooseNumber_leyou(self.driver)
     hb1 = HaobcChooseNumber_leyou(self.driver)
     hc = ConfirmLottery_leyou(self.driver)
     hc1 = PaintBallConfirm_leyou(self.driver)
     hc2 = ArrangeFiveConfirmLottery_leyou(self.driver)
     hl = Login_leyou(self.driver)
     hd = SubmitOrderSuccess_leyou(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.My_lottery_ticket()  # 点击我的彩票
     hl.login_leyou()  # 点击登录
     ha.homepage_link()  # 点击首页
     ha.haobc_link()  # 点击竞彩蓝球
     hb.Play_f()  # 选择玩法
     hb.Play_mix()  ###点击混合投注
     aa = hb1.Basketball_mix_nus_X(3)  # 选择比赛
     if aa == 3:
         hb.confirm_match()  ###点击已选N场比赛
         a = hc1.A_nn()  ###读取删除前有多少个X按钮
         hc1.Del_n(1)  ##点击删除第一场赛事
         a1 = hc1.A_nn()  ###读取删除后有多少个X按钮
         self.assertEqual(a - 1, a1)
         hc.submit_order_to_station_owner_button()  # 提交订单给站主
         hc.confirm_and_pay_button()  # 点击确认支付
         text1 = hd.submit_order_success()  # 获取提交订单成功文本
         self.assertEqual('订单提交成功', text1)
コード例 #2
0
 def test_Play_mix_N_del(self):
     """验证删除赛事X按钮,支付流程"""
     ha = HomePage_leyou(self.driver)
     hb = HaobcChooseNumber_leyou(self.driver)
     hb1 = PaintBallChooseNumber_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.haobc_link()  ##点击竞彩蓝球
     hb.Play_f()  ####点击玩法
     hb.Play_mix()  ##点击混合玩法
     aa = hb.Basketball_mix_nus_X(4)  ###随机点击4场比赛
     if aa > 0:
         hb.confirm_match()  ###点击已选N场比赛
         a = hc1.A_nn()  ###读取删除前有多少个X按钮
         hc1.Del_n(1)  ##点击第1场赛事的X按钮
         a1 = hc1.A_nn()  ###读取删除后有多少个X按钮
         self.assertEqual(a - 1, a1)
         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()  # 点击确认支付