driver.switchTo().window(tabs.get(1)) selenium 3 tab firefox code example
Example: switch tab in selenium
psdbComponent.clickDocumentLink();
ArrayList<String> tabs2 = new ArrayList<String> (driver.getWindowHandles());
driver.switchTo().window(tabs2.get(1));
driver.close();
driver.switchTo().window(tabs2.get(0));