def navigate_with_auth(self, url, login, password): """Navigate to url with authentication""" sleep(CONFIG['backend_data_indexing_time']) config = get_application_settings() config['login'] = login config['password'] = password base_url = '{protocol}://{login}:{password}@{host}'.format(**config) new_url = urljoin(base_url, url) self.go_to_url(new_url)
def navigate(self, url): """Navigate to url without authentication.""" sleep(CONFIG['backend_data_indexing_time']) config = get_application_settings() base_url = '{protocol}://{host}'.format(**config) new_url = urljoin(base_url, url) env_url = urljoin(new_url, config['env']) self.go_to_url(env_url)