Shift control to new window

7 views
Skip to first unread message

Priyanka Saroch

unread,
Jun 19, 2015, 1:51:41 AM6/19/15
to seleniu...@googlegroups.com
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???

Gokul Krishna

unread,
Jun 19, 2015, 2:46:46 PM6/19/15
to seleniu...@googlegroups.com
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 <priyank...@ignatiuz.com> 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 selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
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 all
Reply to author
Forward
0 new messages