close driver selenium code example Example: driver.close driver.close() is used to close the current browser that we are running the test.