Hello all,
I am currently doing my first script using Watir and I am experiencing an
issue. I tried to get an answer by reading many posts but I was not able to
find by myself.
At some point during the scenario that I am automating, a pop-up appears
and I just want to click on a "OK" button. I am doing it with this piece of
code:
ie2 = Watir::IE.attach(:title, "Confirm")
print "checkpoint 2\n"
ie2.button(:name => "OK").click_no_wait
These instructions work fine on 2 computers but it fails for 2 other
computers. I am using same version of ruby, IE, watir libraries and same
OS. I am sure that this is due to this instruction and I don't know why I
get this error:
irb(main):003:0> ie2=Watir::IE.attach(:title, "Google")
WIN32OLERuntimeError: (in OLE method `Windows': )
OLE error code:80070002 in <Unknown>
<No Description>
HRESULT error code:0x80020009
Une exception s?est produite.
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-c
lassic/ie-class.rb:116:in `method_missing'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-c
lassic/ie-class.rb:116:in `each'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-c
lassic/ie-class.rb:173:in `_find_all'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-c
lassic/ie-class.rb:166:in `_find'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-c
lassic/ie-class.rb:653:in `block in attach_browser_window'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-c
lassic/wait.rb:24:in `until'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-c
lassic/ie-class.rb:652:in `attach_browser_window'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-c
lassic/ie-class.rb:557:in `_attach_init'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-c
lassic/ie-class.rb:105:in `attach'
from (irb):3
from C:/Ruby193/bin/irb:12:in `<main>'
irb(main):004:0> ie2=Watir::IE.attach(:title, "Google")
I have found on the attach function "man" that it could be due to the fact
that Ruby has not to be executed as a service. I didn't find it in the
service list so could you please give me a clue about my problem ?
Thank you very much in advance.
Kind regards,
--
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]
---
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.