
[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
-
gaffo May 27th, 2009 @ 12:24 PM
- State changed from new to duplicate
Closing in favor of 229. Merging this comment in. Thanks for the patch.
-
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.
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.
People watching this ticket
Tags
Referenced by
-
229 attach_file not defined in Selenium mode https://webrat.lighthouseapp.com/projects/10503/tickets/...