Hi All,

To add my question to this thread. i have a scenario when in I have
initialized first IE say ie1 where in i have declared a variable "SignIn"
for say "SignIn" button and When I click on some link it opens a new window
and I want to work on that window for which I will use ie2 =
Watir::IE.attach(:title, "second window title")  and My question is if I
want to make use of  variable SignIn for IE2. how can i achieve this?

following is the sample code

ie1 = Watir::IE.new()
ie1.goto("gmail.com")

signin = ie1.button(:text, "SignIn")

now I did some operation and opened a new gmail login page in new browser
and I attached it to ie2 in the following way

ie2 = Watir::IE.attach(:title, "can be anything")

now instead of using ie2.button(:text, "Singin").click() is there any way
that I can make use of already existing variable "signin" ?

Regards,
Kiran

On Fri, Jun 18, 2010 at 1:23 PM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> On Thu, Jun 17, 2010 at 11:10 PM, Cristina <cristina.toro...@gmail.com>
> wrote:
> > The question is how can I close the second browser and return to the main
> one to continue checking the other links?
>
> browser1.link(how, what).click
> browser2 = Watir::Browser.attach(how, what)
> # do something with browser2
> browser2.close
> # continue with browser1
>
> More information:
>
> http://wiki.openqa.org/display/WTR/New+Browser+Windows
>
> Ask if you have further questions.
>
> Željko
> --
> watir.com - community manager
> watirpodcast.com - host
> testingpodcast.com - audio podcasts on software testing. all of them
> vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi
>
>  --
> 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<watir-general%2bunsubscr...@googlegroups.com>
>

-- 
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