With Chrome (chromedriver) it's very simple:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_experimental_option('detach', True)
With Firefox (geckodriver) no:
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
options = Options()
options.add_experimental_option('detach', True) # Returns syntax error
What is the equivalent syntax for leaving the Firefox browser open even when the script ends?
from Python Selenium Firefox geckodriver. Detach browser from terminal
No comments:
Post a Comment