def setUp(self): self.driver = webdriver.Chrome() self.driver.implicitly_wait(settings.configs['MAX_WAITING_TIME']) # seconds self.driver.get(settings.configs['BASE_URL']) self.navigation_bar = page.NavigationBar(self.driver) self.contests = page.AllContests(self.driver) self.navigation_bar.click_all_contests()
def setUp(self): self.driver = webdriver.Chrome() self.driver.implicitly_wait(settings.configs['MAX_WAITING_TIME']) # seconds self.driver.get(settings.configs['BASE_URL']) self.login_page = page.Login(self.driver) self.navigation_bar = page.NavigationBar(self.driver) if self.navigation_bar.is_login(): self.navigation_bar.click_register() self.navigation_bar.click_login()
def setUp(self): self.driver = webdriver.Chrome() self.driver.implicitly_wait(settings.configs['MAX_WAITING_TIME']) # seconds self.driver.get(settings.configs['BASE_URL']) self.personal_page = page.PersonalCenter(self.driver) self.navigation_bar = page.NavigationBar(self.driver) self.login_page = page.Login(self.driver) if self.navigation_bar.is_login(): self.navigation_bar.click_register() self.navigation_bar.click_login() assert self.login_page.login(settings.configs['PARTICIPANT_USERNAME'],settings.configs['PARTICIPANT_PASSWORD']),\ '个人中心-登录失败' self.navigation_bar.click_personal_center()
def setUp(self): self.driver = webdriver.Chrome() self.driver.implicitly_wait(settings.configs['MAX_WAITING_TIME']) # seconds self.driver.get(settings.configs['BASE_URL']) self.index_page = page.IndexPage(self.driver) self.navigation_bar = page.NavigationBar(self.driver)