Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to close windows in selenium python without quitting the browser

for handle in driver.window_handles:
    driver.switch_to.window(handle)
    driver.close()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #close #windows #selenium #python #quitting #browser
ADD COMMENT
Topic
Name
4+1 =