File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
py/test/selenium/webdriver/common Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -181,15 +181,18 @@ def test_Finding_ASingle_Element_By_Empty_Tag_Name_Should_Throw(self):
181
181
self ._load_page ("formPage" )
182
182
try :
183
183
self .driver .find_element (By .TAG_NAME , "" )
184
- self .fail ("Should have thrown a NoSuchElementException " )
185
- except NoSuchElementException :
184
+ self .fail ("Should have thrown an InvalidSelectorException " )
185
+ except InvalidSelectorException :
186
186
pass
187
187
188
188
@pytest .mark .ignore_phantomjs
189
189
def test_Finding_Multiple_Elements_By_Empty_Tag_Name_Should_Return_Empty_List (self ):
190
190
self ._load_page ("formPage" )
191
- elements = self .driver .find_elements (By .TAG_NAME , "" )
192
- self .assertEqual (len (elements ), 0 )
191
+ try :
192
+ self .driver .find_elements (By .TAG_NAME , "" )
193
+ self .fail ("Should have thrown an InvalidSelectorException" )
194
+ except InvalidSelectorException :
195
+ pass
193
196
194
197
def test_Finding_ASingle_Element_By_Tag_Name_With_Space_Should_Throw (self ):
195
198
self ._load_page ("formPage" )
You can’t perform that action at this time.
0 commit comments