def test_fading_in_element_is_displayed_after_some_delay(self): self.driver.ignore_synchronization = True self.driver.get(self.base_url + '/test_fadein.html') Element(self.driver, "//button[@id='button']", "xpath").click() el = Element(self.driver, "//div[@id='test']/p", "xpath", 2500) self.assertTrue(el.is_displayed())
def test_fading_in_element_is_not_displayed_if_opacity_is_zero(self): self.driver.ignore_synchronization = True self.driver.get(self.base_url + '/test_fadein.html') Element(self.driver, "//button[@id='button']", "xpath").click() el = Element(self.driver, "//div[@id='test']/p", "xpath") self.assertFalse(el.is_displayed())
def test_is_displayed_for_not_displayed_element(self): el = Element(self.driver, "//button[@id='hiddenbutton']", 'xpath') self.assertFalse(el.is_displayed())
def test_if_element_is_not_present_it_is_not_displayed(self): self.driver.get(self.base_url + '/index.html') el = Element(self.driver, "//div[@id='NOTEXIST']", 'xpath') self.assertFalse(el.is_present()) self.assertFalse(el.is_displayed())
def test_is_displayed_for_displayed_element(self): el = Element(self.driver, "//button[@id='exacttext']", 'xpath') self.assertTrue(el.is_displayed())