I've tried to set up a script to upload a file using Watir, based on this page
It just hasn't worked. It's still waiting for my input. It does go to the correct directory (folder) in Windows, but it does not actually select my file. Occasionally it will select the file automatically, but that's only after I've made a change to the input_elements.rb file, saved the change and left the file open. If I close the file after making a change, my script waits for me to select a file and click "Open" before proceeding.
I don't have any spaces in my file path; it's set in the script to
C:\\hudson\\workspace\\Watir_test\\test_harness.xml
. If I change the path to C:\\test_harness.xml
, the "choose file" window does not change directories to the C: directory; it waits for my input.
I have modified the input_elements.rb
file based on the suggestions in the linked page, including increasing the wait time to 5 seconds, and it still hasn't helped.
I'm runn开发者_运维百科ing Windows XP, Ruby 1.9.2.
精彩评论