kaliiiiiiiiii / Selenium-Driverless

undetected Selenium without usage of chromedriver
https://kaliiiiiiiiii.github.io/Selenium-Driverless/
Other
430 stars 52 forks source link

save --user-data-dir #103

Closed miltonvo closed 8 months ago

miltonvo commented 8 months ago

its possible to save user data dir for reuse on next launch of instance?

i got it using : options.add_argument(f"--user-data-dir={absolute_path}")

but when i close the instance the dir is removed

kaliiiiiiiiii commented 8 months ago
import sys
from selenium_driverless.sync import webdriver

options = webdriver.ChromeOptions()
options.auto_clean_dirs = False
with webdriver.Chrome(options=options) as driver:
    driver.quit(clean_dirs=False)

@miltonvo maybe next time open a discusstion or search for your issue first before raising an issue. Unless there's an actual bug

miltonvo commented 8 months ago

sure thanks for the help

miltonvo commented 8 months ago

i got this when try to execute:

Chrome.quit() got an unexpected keyword argument 'clean_dirs'

without argument its works close correctly but remove user data folder too

kaliiiiiiiiii commented 8 months ago

i got this when try to execute:

Chrome.quit() got an unexpected keyword argument 'clean_dirs'

without argument its works close correctly but remove user data folder too

make sure to update your version. pip install --upgrade selenium-driverless