def test_is_element_present_element_false(self): browser = BaseBrowserDriver() self.assertFalse(browser.is_element_present([]))
def test_is_element_present_element_true(self): browser = BaseBrowserDriver() self.assertTrue(browser.is_element_present(Mock()))
def test_is_element_present_string_false(self): browser = BaseBrowserDriver() element = [] browser.get_page_element = Mock(return_value=element) browser.get_page_element.called_once_with(element) self.assertFalse(browser.is_element_present('page element'))