The input element which has no type attributes should be regarded as a text field.

This commit is contained in:
Keita Urashima 2010-05-20 10:31:20 +09:00
parent 8ff36c4933
commit 741c31bf2b
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ module Capybara
def text_field(locator, options={})
options = options.merge(:value => options[:with]) if options.has_key?(:with)
add_field(locator, "//input[@type!='radio' and @type!='checkbox' and @type!='hidden']", options)
add_field(locator, "//input[not(@type) or (@type!='radio' and @type!='checkbox' and @type!='hidden')]", options)
end
def text_area(locator, options={})