File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
py/test/selenium/webdriver/common Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -155,16 +155,14 @@ def test_should_be_able_to_find_multiple_elements_by_css_selector(self):
155
155
def test_should_throw_an_error_if_user_passes_in_invalid_by (self ):
156
156
self ._load_page ("nestedElements" )
157
157
element = self .driver .find_element_by_name ("form2" )
158
- with pytest .raises (WebDriverException ) as excinfo :
158
+ with pytest .raises (WebDriverException ):
159
159
element .find_element ("foo" , "bar" )
160
- assert 'Unsupported locator strategy: foo' in str (excinfo .value )
161
160
162
161
def test_should_throw_an_error_if_user_passes_in_invalid_by_when_find_elements (self ):
163
162
self ._load_page ("nestedElements" )
164
163
element = self .driver .find_element_by_name ("form2" )
165
- with pytest .raises (WebDriverException ) as excinfo :
164
+ with pytest .raises (WebDriverException ):
166
165
element .find_elements ("foo" , "bar" )
167
- assert 'Unsupported locator strategy: foo' in str (excinfo .value )
168
166
169
167
def _page_url (self , name ):
170
168
return self .webserver .where_is (name + '.html' )
You can’t perform that action at this time.
0 commit comments