Chrome Browser - getWindowHandles always returning size 1 and not able to navigate to child pop up | Selenium Forum
R
Rajyalakshmi Gubbala Posted on 05/12/2020

Hi,

In chrome browser trying to access pop up from one UI link. but through getWindowHandles always getting size as 1 and not able to identify other child windows. i used delay ( thread.sleep) as well afetr click on filter icon to open up other pop up.

Please suggest work around.

after navigating to URL - home page Here is the code

refundMethodFiltericon.click();
 
Thread.sleep(5000);
Set<String> s = driver.getWindowHandles();
Iterator<String> it = s.iterator();
System.out.println("total windows " + s.size());

String childWindow = null;

while (it.hasNext()) {
childWindow = it.next();
}

System.out.println("childwindow Id " + childWindow);
driver.switchTo().window(childWindow);
String refundMethodTitle = driver.getTitle();
System.out.println("driver of child tittle" + refundMethodTitle);


A
Ashish Thakur Replied on 05/12/2020

Is it a separate browser which is opening or a simple modal window.

Modal window is not a popup. Its a part of same page


R
Rajyalakshmi Gubbala Replied on 05/12/2020

It's not separate window. Thanks now I got it 


Related Posts