Navigation Menu

Skip to content

Commit

Permalink
Merge remote branch 'hashrocket/selenium_inputs'
Browse files Browse the repository at this point in the history
  • Loading branch information
jnicklas committed Jun 19, 2010
2 parents 29c54dd + 88d58ce commit bfeaef4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/capybara/driver/selenium_driver.rb
Expand Up @@ -25,13 +25,13 @@ def value
end

def set(value)
if tag_name == 'textarea' or (tag_name == 'input' and %w(text password hidden file).include?(type))
node.clear
node.send_keys(value.to_s)
elsif tag_name == 'input' and type == 'radio'
if tag_name == 'input' and type == 'radio'
node.click
elsif tag_name == 'input' and type == 'checkbox'
node.click if node.attribute('checked') != value
elsif tag_name == 'textarea' or tag_name == 'input'
node.clear
node.send_keys(value.to_s)
end
end

Expand Down
1 change: 0 additions & 1 deletion lib/capybara/spec/session/fill_in_spec.rb
Expand Up @@ -53,7 +53,6 @@
end

it "should fill in a field with a custom type" do
pending "selenium doesn't seem to find custom fields" if @session.mode == :selenium
@session.fill_in('Schmooo', :with => 'Schmooo is the game')
@session.click_button('awesome')
extract_results(@session)['schmooo'].should == 'Schmooo is the game'
Expand Down

0 comments on commit bfeaef4

Please sign in to comment.