Hi,

thanks for helping us out, Jarmo!

I learned that if I attach to an IE process that is not opened by
Watir::Browser.New, watir is able to locate the Window by its hwnd and
attach to it.

After this the problem was that the newly created ruby process itself
blocked blocking the main process well. This problem went away after I
changed element.rb::Element.spawned_click_no_wait_command so that I
prefixed the returned command string with "start". Now it is "start
ruby #{command}".

Now it works for me on Windows 7.

-- A. Vuori


On 24 marras, 11:50, Arto Vuori <vuo...@iki.fi> wrote:
> Hi Kushal,
>
> I'm having exactly the same problem and I have not found a working
> solution.
> I have a need to open and interact with a modal dialog. 
> However,click_no_waitsimply returns nil.
>
> -- A. Vuori
>
> On 21 marras, 20:29, Kushal <kushal...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi all,
>
> > I am stuck in this problem for three days now. I need to open a modal
> > dialog from a button on a webpage. When I use click or
> > fire_event("onclick"), execution just hangs. This is understandable as
> > it waits for work to be completed on the modal dialog.
>
> > Therefore, I am trying to useclick_no_wait, but it returns nil. I
> > made some changes in theclick_no_waitfunction, to display the call
> > by adding puts command on line 249 and replaced "start rubyw
> > #{command}" with "rubyw #{command}"
>
> > I get the following error on the console:
>
> > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/element.rb:58:in
> > `assert_exists': Unable to locate element, using :unique_number, 1
> > (Watir::Exception::UnknownObjectException)
> >         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/
> > element.rb:263 :in `click!' from -e:1
>
> > The command that is executed in the above call is:
>
> > ruby -e "require 'rubygems';require 'c:/ruby/lib/ruby/gems/1.8/gems/
> > watir-1.6.7/lib/watir/core';Watir::Button.new(Watir::IE.attach(:hwnd,
> > 656538), :unique_number, 1).click!"
>
> > Also, I read this article (http://jira.openqa.org/browse/WTR-144)
> > which describes how fire_event_no_wait could be added to element.rb
> > for fire_event("onmousedown") with no wait. However,
> > eval_in_spawned_process method is not present in PageContainer module
> > in Watir 1.6.7.
>
> > Thanks.
>
> > Kushal

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to