Shift control to new window

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Shift control to new window

Priyanka Saroch
Hi guys,
 
As i am new to selenium please help me to shift the control of parent window to the child window that popus out when a link is been clicked on the parent window ,so as i can add data into the pop out window???

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/4924d49d-e829-4f2d-908e-f560eb3acc03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shift control to new window

Gokul Krishna
Try this out...

loop1:
for(String handle:driver.getWindowHandles())
 {
 driver.switchTo().window(handle);

 if(driver.getTitle().equalsIgnoreCase("New Window"))
 {
                              break loop1;

 }
 
 }

On Thu, Jun 18, 2015 at 12:55 PM, Priyanka Saroch <[hidden email]> wrote:
Hi guys,
 
As i am new to selenium please help me to shift the control of parent window to the child window that popus out when a link is been clicked on the parent window ,so as i can add data into the pop out window???

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/4924d49d-e829-4f2d-908e-f560eb3acc03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAKsZrmOyu8wux_PfWaQW6uOfKxEDBgsanQQ_7X-XvF9tMu%3DD%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.