Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save douglasmartins7/465b486de6c9bdb37a5e28e8bb2eb649 to your computer and use it in GitHub Desktop.
Save douglasmartins7/465b486de6c9bdb37a5e28e8bb2eb649 to your computer and use it in GitHub Desktop.
String janelaAtual = driver.getWindowHandle();
Set<String> janelas = driver.getWindowHandles();
for (String janela : janelas) {
driver.switchTo().window(janela);
if(driver.getCurrentURL().equals("URL DO BROWSER")) {
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment