2

i have a website that i want to login to and it should stay like that for multiple sessions

I tried pickle to save cookies once logged in and then load the cookies when running the script again

but this doesn't work the website logs me out

So i tried to set custom profile for firefox but checking which profile its running on by adding code


# 2- get tmp file location
profiletmp = driver.firefox_profile.path

# but... the current profile is a copy of the original profile :/
print("running profile " + profiletmp)

shows me that i'm running in a tmp directory copied from the main profile mentioned /tmp/xxxxxxxx/webdriver-py-copy

so according to the answer here (Python / Selenium / Firefox: Can't start firefox with specified profile path) i tried copying the folder to main profile but still when loading browser all changes are lost (ex; i made a bookmark and logged into a site then copied the folder over to main profile replacing all the files but still when opening firefox all changes are lost) i can only retain changes if i manually use Firefox profile and then login without geckodriver now when gecko driver loads the page i'm logged in

by adding custom profile location in chromedriver it retains data but i have different issues with chrome and i want to use firefox

Barney Suit
  • 148
  • 7

0 Answers0