I am writing a watir script to test an upload form.
But the script does not automatically choose the file that is to be uploaded from my harddrive.
Instead I
I had the same problem today (March1,2012) and landed here via Google.
Thanks Željko for pointing me in the right direction, however the solution of changing the [POPUP_TITLES] didn't work. In fact, this array seems not to exist anymore in the current version of the gem (watir-2.0.4), or maybe I just misread.
I solved the problem in watir-2.0.4/lib/watir/dialogs/file_field.rb
:
Here, the various window and button titles are defined as regular expressions. Change the regexps in the following methods
to match your localized window names. After reloading the gem, it worked flawlessly.