I'm working in a simple html page that contains a button that open a new tab without "!doctype", and I need to analyze it and go back to the first page
Apparently it is an html page that contains an xml, but I need another solution in Selenium.
I tried this, but I got timeout in
webDriverInstance.switchTo().window(windowTab);
public void switchTab(String url) {
try {
for (String windowTab : webDriverInstance.getWindowHandles()) {
webDriverInstance.switchTo().window(windowTab);
if (webDriverInstance.getCurrentUrl().contains(url))
break;
}
} catch (Exception e) {
log.debug("Não foi possivel trocar aba", e);
}
setWait();
}
View Page
Source page
I thought I would find the answer on this question but it was not exactly my scenario