-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,7 +145,12 @@ def first(*args) | |
|
||
def resolve_query(query, exact=nil) | ||
elements = synchronize do | ||
base.find(query.xpath(exact)).map do |node| | ||
# base.find(query.xpath(exact)).map do |node| | ||
if query.selector.name==:css && base.respond_to?(:find_css) | ||
base.find_css(query.locator) | ||
else | ||
base.find(query.xpath(exact)) | ||
end.map do |node| | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jnicklas
Collaborator
|
||
Capybara::Node::Element.new(session, node, self, query) | ||
end | ||
end | ||
|
@jnicklas at least with capybara-webkit this leads to regressions as the css engine there can't handle everything that XPath could convert to.
thoughtbot/capybara-webkit#510
One can maybe say that the syntax was not supported to begin with but still I would have in 2.1 kept this feature behind a config switch. What do you think?