Bugs item #2485, was opened at 2005-09-20 10:51
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=487&aid=2485&group_id=104
Category: Dialogs
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: WinClicker problems when ruby/watir installed in program files
Initial Comment:
Just been down to diagnose/workaround a problem with some colleagues.
The stuff in winclicker that uses 'start' and @path_to_clicker has some
problems when the clicker is installed in a dir with spaces. Our bug
manifested in setFileRequesterFileName_newProcess, but I'd expect to see it
elsewhere too.
The current version of the method renders this command line for winsystem to
execute:
start C:\Program Files\ruby\lib\ruby\site_ruby\1.8\watir\setFileDialog.rb
c:\myfile.txt
We started by quoting the commmand, so the result was:
start "C:\Program Files\ruby\lib\ruby\site_ruby\1.8\watir\setFileDialog.rb"
c:\myfile.txt
We discovered that start interprets the "" as a window title (see help for
start) , so we needed to prefix a dummy window title to keep moving:
start "windowtitle" "C:\Program
Files\ruby\lib\ruby\site_ruby\1.8\watir\setFileDialog.rb" c:\myfile.txt
The resultant method looks like this:
def setFileRequesterFileName_newProcess ( textToSet )
myapp = "[EMAIL PROTECTED]/setFileDialog.rb\ #{textToSet}"
puts "Starting win setFileDialog in new process. Setting text #{textToSet}"
puts "Starting app: #{myapp}"
winsystem( "start \windowtitle\ #{myapp}" )
end
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=487&aid=2485&group_id=104
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general