I'm not sure why that happens with the parent window, but you should
be able to attach back to the parent:

ff = FireWatir::Firefox.attach(:title, "Parent Window")

Thanks,
Adam

On Jul 26, 6:07 am, Amit Kumar <amit.e...@gmail.com> wrote:
> Hi All!
>
> I'm using Firewatir 1.6.5
> I want to test an web application which open a pop up window.
> I want to attach this pop up window with firewatir. So, i have written below
> code:
>
> require 'firewatir'
> ff =FireWatir::Firefox.new
> ff.goto("www.example.com")
> ff.link(:text,"Pop_up).click
> ff2= FireWatir::Firefox.attach(:title,"New Pop Up Window")
>
> Now, the problem is... After attaching new pop up window, firewatir loose
> control over parent window. It remember only pop up window which have
> attached recently and forget parent window. So, i can't access parent
> application anymore.
>
> eg: puts ff.title ==> "New Pop Up Window"
>      puts ff2.title ==> "New Pop Up Window"
>
> It doesn't return window title of parent window.
>
> Any comments or solution??
>
> Thank You

-- 
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-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com

Reply via email to