Grrr! click_no_wait does not work :-(

1 view
Skip to first unread message

Rats

unread,
Apr 12, 2010, 4:56:15 PM4/12/10
to Watir General
I've been looking at ways of handling pop ups and it appears the way
to go is via click_no_wait. Unfortunately this is not working for me
as when I run the click_no_wait command it just flashes the button and
does not click it hence no popup window.

I'm running:

ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
watir (1.6.5)

Any ideas? Thanks.

Eric Mathiesen

unread,
Apr 12, 2010, 4:57:37 PM4/12/10
to watir-...@googlegroups.com
Might be a simplistic answer, but have you set focus to the child popup window?


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

You received this message because you are subscribed to http://groups.google.com/group/watir-general
To post: watir-...@googlegroups.com

To unsubscribe, reply using "remove me" as the subject.

Ethan

unread,
Apr 12, 2010, 5:11:34 PM4/12/10
to watir-...@googlegroups.com
Is the popup triggered by an onclick event, or an onmouseup or onmousedown event? If it's the latter, watir won't trigger it; #click and #click_no_wait don't do those events. you'll have to explicitly fire_event_no_wait('onmousedown') or mouseup. 

Rats

unread,
Apr 12, 2010, 5:12:27 PM4/12/10
to Watir General
On Apr 13, 8:57 am, Eric Mathiesen <mathiese...@gmail.com> wrote:
> Might be a simplistic answer, but have you set focus to the child popup
> window?

I am fairly sure it's not a hidden pop up or anything like that as if
I manually click the button (after click_no_wait flashes it) the pop
up is displayed.

.click by itself works fine it's only click_no_wait which flashes the
button and does not "click" it.

This is turning into a real nightmare as we've introduced confirm pop
ups in a number of places and all my scripts are stalling at this
point. :-(

Rats

unread,
Apr 12, 2010, 5:23:38 PM4/12/10
to Watir General
On Apr 13, 9:11 am, Ethan <notet...@gmail.com> wrote:
> Is the popup triggered by an onclick event, or an onmouseup or onmousedown
> event? If it's the latter, watir won't trigger it; #click and #click_no_wait
> don't do those events. you'll have to explicitly
> fire_event_no_wait('onmousedown') or mouseup.

All I can say is that .click works.

Rats

unread,
Apr 12, 2010, 5:53:19 PM4/12/10
to Watir General
On Apr 13, 9:11 am, Ethan <notet...@gmail.com> wrote:
> Is the popup triggered by an onclick event, or an onmouseup or onmousedown
> event? If it's the latter, watir won't trigger it; #click and #click_no_wait
> don't do those events. you'll have to explicitly
> fire_event_no_wait('onmousedown') or mouseup.


I've tried fire_event_no_wait without any success. Again it does the
same thing by flashing the button and the pop up down not launch.

pallavi shashidhar

unread,
Apr 13, 2010, 1:57:59 AM4/13/10
to watir-...@googlegroups.com
Hi,
There is an issue with click_no_wait in 1.6.5 . Pls read this http://jira.openqa.org/browse/WTR-320
Try adding the patch to page_container.rb
This fix should get your click_no_wait working.

Regards,
Pallavi


--

Jarmo Pertman

unread,
Apr 13, 2010, 4:14:14 PM4/13/10
to Watir General
I've written in my blog about a method how to debug problems related
to click_no_wait at http://www.itreallymatters.net/post/378669758/debugging-watirs-click-no-wait-method-problems

It might not be the same problem as in the mentioned bug, but just
make sure :)

Jarmo

On Apr 13, 8:57 am, pallavi shashidhar <pals.sha...@gmail.com> wrote:
> Hi,

> There is an issue with click_no_wait in 1.6.5 . Pls read thishttp://jira.openqa.org/browse/WTR-320


> Try adding the patch to page_container.rb
> This fix should get your click_no_wait working.
>
> Regards,
> Pallavi
>
>
>
> On Tue, Apr 13, 2010 at 3:23 AM, Rats <crapats...@yahoo.com.au> wrote:
> > On Apr 13, 9:11 am, Ethan <notet...@gmail.com> wrote:
> > > Is the popup triggered by an onclick event, or an onmouseup or
> > onmousedown
> > > event? If it's the latter, watir won't trigger it; #click and
> > #click_no_wait
> > > don't do those events. you'll have to explicitly
> > > fire_event_no_wait('onmousedown') or mouseup.
>
> > I've tried fire_event_no_wait without any success. Again it does the
> > same thing by flashing the button and the pop up down not launch.
>
> > --

> > Before posting, please readhttp://watir.com/support. In short: search

Reply all
Reply to author
Forward
0 new messages