- How can I close the browser window without closing the browser?
- from selenium import webdriver
- driver = webdriver.Firefox()
- driver.get("http://www.google.com")
- # so far so good
- driver.close()
- # quits the app altogether :(
- driver.get("http://www.google.com")
- # doesn't do anything