def test_choose_num_clear_button_case(self): '''选号页面清除所选比赛流程测试''' hp = HomePage_lelun(self.driver) pbcn = PaintBallChooseNumber_lelun(self.driver) sfcn = SingleFootChooseNumber_lelun(self.driver) pbc = PaintBallConfirm_lelun(self.driver) sfcl = SingleFootConfirmLottery_lelun(self.driver) cl = ConfirmLottery_lelun(self.driver) l = Login_lelun(self.driver) hp.open() hp.Moveable_float_close() hp.single_foot_link() ##点击竞足 pbcn.Play_f() # 选择玩法 pbcn.Play_2x1() # 选择2选1 aa = sfcn.jzdg_two_choose_one_choose(1) # 选择比赛 if aa > 0: pbcn.clear_button() # 点击清除按钮 sfcn.jzdg_two_choose_one_choose(1) # 选择1场比赛 pbcn.confirm_match() # 确认所选场次 sleep(2) text1 = sfcl.lottery_times_text() # 获取投注倍数文本 self.assertIn("1注5倍 ", text1) if aa == 0: texxt = hp.header_text() #获取首页顶端文本 self.assertEqual("乐仑炫彩", texxt)
def test_choose_num_clear_button_case(self): '''选号页面清除所选比赛流程测试''' hp = HomePage_lelun(self.driver) pbcn = PaintBallChooseNumber_lelun(self.driver) pbc = PaintBallConfirm_lelun(self.driver) cl = ConfirmLottery_lelun(self.driver) l = Login_lelun(self.driver) hp.open() hp.paintball_link() ##点击竞足 pbcn.Play_f() # 选择玩法 pbcn.Play_rqspf() # 选择让球胜平负 aa = pbcn.rqspf_choose(2) # 选择比赛 if aa == 2: pbcn.clear_button() #点击清除按钮 pbcn.rqspf_choose(3) #选择3场比赛 pbcn.confirm_match() #确认所选场次 text = pbc.Pf_pass_text() #获取过关方式文本 self.assertIn("3串1", text)