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