Where are you running this code from? The path you specified is relative to your current directory as it is missing the slash at the beginning.
You also don't need all the backslashes. Backslash is an escape character that escapes the character immediately following it. In your case you're escaping characters like j and D. Either way not needed when you wrap your path in double quotes. -- Sent from my Android. Joe Fleck <joeflec...@gmail.com> wrote: I have tried this and it keeps erroring out. here is my line of code: #Attach file @browser.file_field(:id, "the_file").set("Users/\josephfleck/\Documents/\Download Docs/\criptDataFile.xls") The error I am receiving: /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/file_field.rb:13:in `set': No such file or directory - Users/josephfleck/Documents/Download Docs/ iptDataFile.xls (Errno::ENOENT) from ./common/helper_methods.rb:182:in `share_documents' from /Users/josephfleck/Sites/within3/qa_automation/discussion/add_multiple_discussion.rb:159 from /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/fastercsv-1.5.4/lib/faster_csv.rb:696:in `each' from /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/fastercsv-1.5.4/lib/faster_csv.rb:696:in `each' from /Users/josephfleck/Sites/within3/qa_automation/discussion/add_multiple_discussion.rb:38 The file does exist so I am not sure what the problem might be. Do I need to change [:id, "the_file"] to something else? Thank you, Joe On Mon, Oct 17, 2011 at 11:25 AM, Željko Filipin <zeljko.fili...@wa-research.ch> wrote: On Mon, Oct 17, 2011 at 4:53 PM, Joe Fleck <joeflec...@gmail.com> wrote: > How do click the Open button? You do not have to click "browse" or "open" buttons, all you have to do is this: browser.file_field(:id, "the_file").set("image.png") Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com