def test_find_element_by_xpath_exception_not_found(self): self.driver.get(self.base_url + '/index.html') el = Element(self.driver, "//span[@id='xpath_not_found']", 'xpath') with self.assertRaises(NoSuchElementException): el.web_element()
def test_find_element_by_model_exception_not_found(self): self.driver.get(self.base_url + '/index.html') el = Element(self.driver, 'model_not_found', 'model') with self.assertRaises(NoSuchElementException): el.web_element()
def test_find_element_by_exception_not_supported(self): self.driver.get(self.base_url + '/index.html') el = Element(self.driver, 'greeting', 'notsupported') with self.assertRaises(SearchByElementError): el.web_element()
def test_find_element_by_model_exception(self): el = Element(self.driver, 'username', 'model') with self.assertRaises(SearchByElementException): el.web_element()
def test_find_element_by_binding_exception(self): el = Element(self.driver, 'greeting', 'binding') with self.assertRaises(SearchByElementException): el.web_element()
def test_find_element_by_xpath_exception_not_found(self): el = Element(self.driver, "//[@id='xpath_not_found']", 'xpath') with self.assertRaises(NoSuchElementException): el.web_element()
def test_find_element_by_exception_not_supported(self): el = Element(self.driver, 'greeting', 'notsupported') with self.assertRaises(SearchByElementException): el.web_element()