Pallavi, Angrez hello,

Thank you for the replies.

I was trying your suggestion:

$ff.startClicker("ok")
$ff.startClicker("ok")
$ff.image(:name, /elete/).click

But it still didn't close the popup.

I am able to do it with watir like this:

Thread.new{system("rubyw myClicker.rb")}
$ie.image(:name, /elete/).click
Thread.new { system("rubyw myClicker.rb")}

and I have a file: myClicker.rb with the code:

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 ==
__FILE__

require 'watir/WindowHelper'

$helper = WindowHelper.new
$helper.push_confirm_button_ok()

It is not always clicking the popups so sometimes I have to click on
either of the popups manually, and the test is waiting for the click.
But basically it is not breaking the test.



On Nov 16, 4:06 am, Angrez Singh <[email protected]> wrote:
> It might work, because both of them will be looking for the pop up to close.
> When you click the delete button pop up will come, not sure which thread
> will close the pop up. But second one will close second pop up if you are
> using Auto IT.
> In Firewatir the concept is bit different, I don't use AutoIT to close the
> pop up to make it cross-platform. So if you are on Windows you can use
> AutoIt in two different threads and tell them to close the pop ups.
>
> - Angrez
>
> On Mon, Nov 16, 2009 at 5:24 PM, Pallavi Sharma 
> <[email protected]>wrote:
>
>
>
> > Can't you start two start clickers at once? Will they both try to access
> > the first pop up and if found close it?
>
> > So  what i am suggesting is this:
>
> > ff.startClicker("ok")
> > $ff.startClicker("ok")
> > $ff.image(:name, /elete/).click
>
> > Wont this work Angrez?
>
> > I had a similar situation for IE, and i used the Auto IT script to handle
> > popup by calling them in separate threads but both invoked at the same
> > time.
>
> > --
> > Pallavi.
>
> > On Mon, Nov 16, 2009 at 3:17 PM, Angrez Singh <[email protected]> wrote:
>
> >> It would be bit tricky to handle the second pop up. I'll try here at my
> >> end and if possible will come up with some solution, but as of now it might
> >> not be possible.
>
> >> Thanks,
> >> Angrez
>
> >> On Mon, Nov 16, 2009 at 1:14 PM, Shlomit Gazit 
> >> <[email protected]>wrote:
>
> >>> Anybody??
>
> >>> On Nov 13, 4:43 pm, Shlomit Gazit <[email protected]> wrote:
> >>> > Hello,
>
> >>> > I am trying to handlepopupswithfirewatir.
> >>> > My scenario is clicking on delete button, a popup confirmation will
> >>> > open and I should click "ok".  After that a second popup will open and
> >>> > I should write the reason and click "ok".
>
> >>> > So far I was able to click on the delete button and the second popup
> >>> > will appear but not closed (the first popup is not appearing, but I
> >>> > assume it is by design).
>
> >>> > How can I close the second popup?
>
> >>> > Myfirewatircode is:
>
> >>> > $ff.startClicker("ok")
> >>> > $ff.image(:name, /elete/).click
> >>> > $ff.startClicker("ok")
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to