def test_link_href(self): self.assertEqual(Link("heliumhq.com").href, "http://heliumhq.com/")
def test_link_empty_href(self): self.assertEqual(Link("Link with empty href").href, "")
def test_span_with_role_link_exists_as_link(self): self.assertTrue(Link("Span with role=link").exists())
def test_link_no_text(self): self.assertEqual(4, len(find_all(Link())))
def test_link_with_title_exists(self): self.assertTrue(Link('Link with title').exists())
def test_link_exists(self): self.assertTrue(Link("Link").exists())
def test_handles_closed_window_gracefully(self): self._open_popup() get_driver().close() is_back_in_main_window = Link("Open popup").exists() self.assertTrue(is_back_in_main_window)