diff --git a/lib/capybara/selector/selector.rb b/lib/capybara/selector/selector.rb index 18ad0a81..a34f0794 100644 --- a/lib/capybara/selector/selector.rb +++ b/lib/capybara/selector/selector.rb @@ -234,7 +234,7 @@ module Capybara end def locate_field(xpath, locator, **options) - locate_field = xpath #need to save original xpath for the label wrap + locate_xpath = xpath #need to save original xpath for the label wrap if locator locator = locator.to_s attr_matchers = XPath.attr(:id).equals(locator).or(