def get_data(self): self.driver = InitDriver.get_driver(InitDriver) self.action = InitDriver.get_action(InitDriver) self.lodding_time = Data.lodding_wait_time #等待时间 self.wait_time = Data.wait_time self.point_low = Data.point_low #分值区间下限 self.point_high = Data.point_high #分值区间上限 self.debate_round_times = Data.DEBATE_ROUND_TIMES #辩论循环赛轮数 self.debate_win_num = Data.DEBATE_WIN_NUM #晋级队伍数 self.success_promote = Data.SUCCESS_PTOMOTE #把比赛时间设置为今天提示
def get_data(self): self.driver = InitDriver.get_driver(InitDriver) self.action = InitDriver.get_action(InitDriver) self.lodding_time = Data.lodding_wait_time #等待时间 self.wait_time = Data.wait_time self.point_low = Data.point_low #分值区间下限 self.point_high = Data.point_high #分值区间上限 self.debate_round_times = Data.DEBATE_ROUND #辩论循环赛轮数 self.debate_win_num = Data.DEBATE_WIN_NUM #晋级队伍数 self.success_promote = Data.SUCCESS_PTOMOTE #把比赛时间设置为今天提示 self.sleep_time = Data.sleep_time #UI操作等待时间 self.event_type = Data.event_type #赛事类型 self.match_list = Data.MATCH_LIST #匹配方式 self.flight_list = Data.FLISHT_LIST #flight类型
def get_data(self): self.login_email = Data.user_email #读取登录邮箱 self.login_password = Data.user_password #读取登陆密码 self.lodding_wait_time = Data.lodding_wait_time #读取等待时间 self.wait_time = Data.wait_time #读取等待时间 self.sleep_time = Data.sleep_time #ui操作间隔 self.driver = InitDriver.get_driver(InitDriver)
from NSDAEvent.cases.rules import Rules from NSDAEvent.cases.judge import Judge from NSDAEvent.cases.room import Room from NSDAEvent.cases.check import Check if __name__ == '__main__': wait_time = Data.wait_time driver = webdriver.Chrome() driver.maximize_window() driver.get(Data.url) WebDriverWait(driver, wait_time).until( lambda driver: driver.find_element(LoginLocator.EMAIL_INPUT_BOX[0], LoginLocator.EMAIL_INPUT_BOX[1])) driver.implicitly_wait(Data.implicitly_wait_time) action = webdriver.TouchActions(driver) InitDriver.set_driver(InitDriver, driver=driver) InitDriver.set_action(InitDriver, action=action) #-----------------------------执行测试用例---------------------------------------------------- suite_check = unittest.TestLoader().loadTestsFromTestCase(Check) #检查赛事配置 suite_login = unittest.TestLoader().loadTestsFromTestCase(Login) #登录赛事管理员 suite_rules = unittest.TestLoader().loadTestsFromTestCase(Rules) #设置比赛规则 suite_judge = unittest.TestLoader().loadTestsFromTestCase(Judge) #添加裁判测试用例 suite_room = unittest.TestLoader().loadTestsFromTestCase(Room) #添加教室测试用例 suite = unittest.TestSuite([suite_check, suite_login, suite_rules]) unittest.TextTestRunner(verbosity=2).run(suite) driver.close() #关闭浏览器
def get_data(self): self.driver = InitDriver.get_driver(InitDriver) self.wait_time = Data.wait_time self.room_number = RoomLocator.ROOM_NAME_LIST.__len__()
def get_data(self): self.login_email = Data.user_email self.login_password = Data.user_password self.lodding_wait_time = Data.lodding_wait_time self.wait_time = Data.wait_time self.driver = InitDriver.get_driver(InitDriver)
def get_data(self): self.driver = InitDriver.get_driver(InitDriver) self.wait_time = Data.wait_time self.judge_number = JudgeLocator.JUDGE_NAME_LIST.__len__()