S
S
SashaN692022-04-15 21:14:14
Python
SashaN69, 2022-04-15 21:14:14

How not to close selenium python browser?

Good afternoon, I just started learning selenium, how can I leave it running and close only by condition?

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager

options = Options()
options.add_argument("start-maximized")
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
driver.get('google.com')

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question