On 3/21/06, Cain, Mark <[EMAIL PROTECTED]> wrote:
> It may be related but I have been seeing this since I put your suggestions
> into my script. The $ie.button("...").click_no_wait worked but gives this
> error:
>
> -e:1: C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in
> `method_missing': busy (WIN32OLERuntimeError)
>
>     OLE error code:80004005 in <Unknown>
>
>       <No Description>
>
>     HRESULT error code:0x80020009
>
>       Exception occurred.     from
> C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `wait'
>
>       from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2258:in
> `click'
>
>       from (eval):1
>
> The script continues and completes without further error.

Hmm. I would say this is a bug in click_no_wait. The reality is that
the current implementation still calls the wait code, but
asynchronously, so it immediately passes control to the next command.
Usually this is harmless, but this is a clear example demonstrating
that this needs more work. Would you mind opening a Jira issue for
this?


> By the way, $ie.button("...").ole_object.click did not I
> get this error:
>
>   1) Error:
>
> test_main(TC_ARM_Start):
>
> NoMethodError: undefined method `click' for nil:NilClass
>
>     C:/watir_bonus/working/ARM/tc_ARM_Start.rb:40:in
> `test_main'

Try this instead.

  button = $ie.button(...)
  button.locate
  button.ole_object.click

This should also work, but i won't be surprised if it doesn't:

  $ie.button(...).locate.ole_object.click

Thank you for trying my suggestions and reporting these problems.

Bret

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to