Skip to content

Commit

Permalink
[Py] Update tagName test searching for "" to throw
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester committed Jan 20, 2016
1 parent 23abcd6 commit 0b1d2ce
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,18 @@ def test_Finding_ASingle_Element_By_Empty_Tag_Name_Should_Throw(self):
self._load_page("formPage")
try:
self.driver.find_element(By.TAG_NAME, "")
self.fail("Should have thrown a NoSuchElementException")
except NoSuchElementException:
self.fail("Should have thrown an InvalidSelectorException")
except InvalidSelectorException:
pass

@pytest.mark.ignore_phantomjs
def test_Finding_Multiple_Elements_By_Empty_Tag_Name_Should_Return_Empty_List(self):
self._load_page("formPage")
elements = self.driver.find_elements(By.TAG_NAME, "")
self.assertEqual(len(elements), 0)
try:
self.driver.find_elements(By.TAG_NAME, "")
self.fail("Should have thrown an InvalidSelectorException")
except InvalidSelectorException:
pass

def test_Finding_ASingle_Element_By_Tag_Name_With_Space_Should_Throw(self):
self._load_page("formPage")
Expand Down

0 comments on commit 0b1d2ce

Please sign in to comment.