selenium closed opened tab and go back to the first code example Example: selenium close current tab driver.close();