def test_mark_place_as_visited(self):
        self.browser.get(self.live_server_url)

        visited_button = self.browser.find_element_by_id('visited-button-2')

        ny_gone = self.browser.find_element_by_id('place-name-2')

        visited_button.click()
        wait = WebDriverWait(self.browser, 3)
        ny_has_gone = wait.until(EC.invisibility_of_element_located((By.ID, 'place-name-2')))

        assert 'Tokyo' in self.browser.page_source

        assert 'New York' not in self.browser.page_source

        self.browser.get(self.live_server_url + '/visited')

        assert 'New York' in self.browser.page_source

        assert 'San Francisco' in self.browser.page_source
        assert 'Moab' in self.browser.page_source
Exemplo n.º 2
0
 def ConfirmCopy(self):
     copyMessage = WebDriverWait(self.browser, 10).until(
         EC.invisibility_of_element_located(
             self.Locator_login_buttons["CopyConfirm"]))
     copyMessage.click()