|
Try this, it works on my computer. You may
need to change the required path to your Watir install directory. Change
the “<location to save to>” to some save path of your choosing $LOAD_PATH.unshift
File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'C:\watir\unittests\setup' require 'watir' require 'win32ole' include Watir docName = "XUS8120873file1.pdf (19
Kb)" testSite
="http://www.stickyminds.com/r.asp?F=DART_9601" $path = "C\:\\<location to save
to>\\" #e.g. "C\:\\watir_bonus\\working\\" $ie = IE.new puts "Beginning of Example: Sticky
Minds" sleep 1 puts "Step 1: go to the test site:
" + testSite $ie.goto(testSite) $ie.link(:text, "XUS8120873file1.pdf
(19 Kb)").click $autoit =
WIN32OLE.new("AutoItX3.Control") $autoit.WinWait("File Download",
"Do you want to open or save this file?", 3) $autoit.ControlClick("File
Download", "Do you want to open or save this file?",
"&Save") $autoit.WinWait("Save As",
"Save &in", 3) $autoit.ControlSend("Save As",
"", "Edit1", "#{$path}temp.pdf") $autoit.ControlClick("Save As",
"Save &in", "&Save") --Mark From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Müller Michael (BB) It doesn't work. I don't know what to do.
I checked the documentation and tried several different things. I also started AUInfo.exe and the Controls and Information are exactely
the same as in your example script. I've inserted also statement to give out if a function was executed.
The logfile then has all the Statements inside, as all function where executed
properly, but also a Error is stated: WIN32OLERuntimeError: Unknown property or method 'document' HRESULT error code:0x800706ba The RPC Server
is unavailable c:\ruby\.......\watir.rb: in 'method_missing' c:\ruby\.......\watir.rb: in 'document' c:\ruby\.......\watir.rb: in 'getLink' c:\ruby\.......\watir.rb: in 'initialize' c:\ruby\.......\watir.rb: in 'new' c:\ruby\.......\watir.rb: in 'link' c:\watir_bonus\...\document_lib.rb (stating the line number where
the error started, is the next fnuction after the autoit functions) Von:
[EMAIL PROTECTED] im Auftrag von Dave Burt Mueller schrieb: |
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
