Re: [selenium-users] Not able to get control to the child window.

24 views
Skip to first unread message

Anji Prassana

unread,
Apr 16, 2013, 2:09:08 AM4/16/13
to seleniu...@googlegroups.com
From your Scrrenshot, It looks like the child window is part of your current page itself. So, try once without swiching to any other window.

On Tue, Apr 16, 2013 at 9:26 AM, Harsh Ma <harsh....@gmail.com> wrote:
Hi All, 

I am trying to switch control from parent to child window and i am i am not able to do so 
IT says " NO such window" while not sure what is wrong :(

i am attaching the screenshots of what actually i am doing can any one please suggest me.

not to be harsh from my side i am googled a lot and made all kind of chnages like 
    driver.switchto().window("  WN ")
    driver.switchto().frome(" WN ")
    driver.switchto().alert()
                 http://krezydibs.blogspot.in/
& many many more after failing in all these i am asking u :) Sorry for disturbing :)


Thanks
Harsh


--
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/msg/selenium-users/-/_hAyA4iv2XEJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Thanks&Regards
Anjaneyulu P
"The way you see the things is the way you think and is the way you react upon!!"

Harsh Ma

unread,
Apr 17, 2013, 12:03:35 AM4/17/13
to seleniu...@googlegroups.com, anji...@yahoo.co.in
Hi,

I tried it and i am not able to give the control to child window.
Any more suggestions .

Thanks
Harsh

MANU CHADHA

unread,
Apr 17, 2013, 2:08:11 AM4/17/13
to seleniu...@googlegroups.com
Try this
public void switchWindow(){
Set<String> handles=getWebDriver().getWindowHandles();
Iterator<String> it=handles.iterator();
String parentwindow=it.next();
String childwindow=it.next();
getWebDriver().switchTo().window(childwindow);
Reply all
Reply to author
Forward
0 new messages