I'm trying to load a FirefoxProfile with selenium in Python, in order to make use of a persistent login cookie.
profile = webdriver.FirefoxProfile(profile_directory='~/.mozilla/firefox/gu16idx8.default/')
driver = webdriver.Firefox(profile)
The frist line above throws this error:
FileNotFoundError: [Errno 2] No such file or directory: '~/.mozilla/firefox/gu16idx8.default/'
Even though the file does exist (verified with cd ~/.mozilla/firefox/gu16idx8.default/
)
Any thoughts?