selenium use tab to move to next item java code example
Example: switch tab in selenium
psdbComponent.clickDocumentLink();
ArrayList tabs2 = new ArrayList (driver.getWindowHandles());
driver.switchTo().window(tabs2.get(1));
driver.close();
driver.switchTo().window(tabs2.get(0));