#251 ✓duplicate
ian (at ianduggan)

[PATCH] Implement attach_file for webrat/selenium

Reported by ian (at ianduggan) | May 26th, 2009 @ 06:31 PM

The attach_file method is missing from webrat/selenium. Usually you can use js to attach_files, but if you are running with "*chrome" it works.

Grab the patch here: http://github.com/ijcd/webrat/commit/d79a2920fb17b59e88673d5245c2fc...

diff --git a/lib/webrat/selenium/selenium_session.rb b/lib/webrat/selenium/selenium_session.rb
index 0130b5e..8135bce 100644
--- a/lib/webrat/selenium/selenium_session.rb +++ b/lib/webrat/selenium/selenium_session.rb @@ -48,6 +48,10 @@ module Webrat

 webrat_deprecate :fills_in, :fill_in
  • def attach_file(field_locator, path, content_type = nil)
  • fill_in(field_locator, :with => path)
  • end + def response SeleniumResponse.new(self, response_body) end

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Ruby Acceptance Testing for Web applications.

Shared Ticket Bins

People watching this ticket

Referenced by