Closed ydah closed 8 months ago
within find('foo.bar') and within 'foo.bar' have the same behavior. https://www.rubydoc.info/gems/capybara/Capybara%2FSession:within
within find('foo.bar')
within 'foo.bar'
We consider it redundant to pass the result of find as the argument of within, since we are executing find internally. https://github.com/teamcapybara/capybara/blob/0b43cb90ae633ce9b2008e07b997c76833fa570e/lib/capybara/session.rb#L362-L363
find
# bad within find('foo.bar') do end # good within 'foo.bar' do end
within find('foo.bar')
andwithin 'foo.bar'
have the same behavior. https://www.rubydoc.info/gems/capybara/Capybara%2FSession:withinWe consider it redundant to pass the result of
find
as the argument of within, since we are executingfind
internally. https://github.com/teamcapybara/capybara/blob/0b43cb90ae633ce9b2008e07b997c76833fa570e/lib/capybara/session.rb#L362-L363