selenium close second tab wtih 1 driver code example Example: selenium close current tab driver.close();