compare base node / fix warning message

This commit is contained in:
Thomas Walpole 2016-04-06 14:20:23 -07:00
parent 6461684927
commit 700c9d4671
2 changed files with 3 additions and 3 deletions

View File

@ -381,8 +381,8 @@ module Capybara
end
def save_and_open_page_path=(path)
warn "DEPRECATED: #save_and_open_page_path is deprecated, please use #save_path instead. \m"\
"Note: behavior is slightly different with relative paths - see documentation" unless path.nil?
warn "DEPRECATED: #save_and_open_page_path is deprecated, please use #save_path instead. \n"\
"Note: Behavior is slightly different with relative paths - see documentation" unless path.nil?
@save_and_open_page_path = path
end

View File

@ -362,7 +362,7 @@ Capybara.add_selector(:label) do
if field_or_value[:id] && (field_or_value[:id] == node[:for])
true
else
field_or_value.find_xpath('./ancestor::label[1]').include? node
field_or_value.find_xpath('./ancestor::label[1]').include? node.base
end
else
node[:for] == field_or_value.to_s