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);
Instructor
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
It's not separate window. Thanks now I got it