I'm using selenium webdriver
in java
and I have lots of frames in the app under test.
here is my code for switching frames :
ClientPg.waitLong(1);
ClientPg.getWindowHandle();
ClientPg.switchToDefaultContent();
public void getWindowHandle() {
for (String winHandle : driver.getWindowHandles()) {
driver.switchTo().window(winHandle);
}
driver.manage().window().maximize();
reportLog("Switch to new window. Title : " + driver.getTitle());
}
public void switchToDefaultContent() {
driver.switchTo().defaultContent();
}
}
with chrome
it works as follows:
ClientPg.waitLong(1);
ClientPg.getWindowHandle();
but in firefox
i need to add
:switchToDefaultContent();