def auth(self): self.open() form = AuthForm(self.driver) form.set_login(os.environ['LOGIN']) form.next() form.set_password(os.environ['PASSWORD']) form.submit() wait_for_url(self.driver, TODO_MAIN_URL)
def auth(self): self.open() form = AuthForm(self.driver) wait_for_element_by_selector(self.driver, self.FORM) form.set_login(os.environ['LOGIN']) form.set_password(os.environ['PASSWORD']) form.submit() wait_for_url(self.driver, VIRUSMUSIC_BASE_URL)
def test_for_valid_login_page(domain, proto): open_page(f"{proto}://{domain}") url = f"{proto}://{domain}/login" chat("waiting for correct url...") if not wait_for_url(url, refresh=True): chat("baaad, new url not 'found'") sleep(1) return False if not wait_for_xpath('//*[@id="user"]', 2): chat("cannot find login-input field(s)") sleep(1) return False sleep(1) return True
def tearDown(self): page = PlaylistPage(self.driver, self.playlistId) page.delete() wait_for_pop_up(self.driver) wait_for_url(self.driver, VIRUSMUSIC_BASE_URL + 'profile/playlists') super().tearDown()
def test(self): page = ListPage(self.driver) page.delete() wait_for_url(self.driver, TODO_MAIN_URL) page = MainPage(self.driver) self.assertEqual(self.lists - 1, page.count_lists())