So I want to store a Whatsapp Web session in order to not having to scan Whatsapp Web's QR-Code every time. I did it with the following code:
options = webdriver.ChromeOptions()
options.add_argument("--user-data-dir=C:/Users/Pascal/AppData/Local/Google/Chrome/User Data")
browser = webdriver.Chrome(executable_path="C:/Users/Pascal/Desktop/chromedriver.exe", options = options)
browser.get("https://web.whatsapp.com/")
The above code worked perfectly (Chromebrowser) but the following code which is almost the same does not work:
options = webdriver.FirefoxOptions()
options.add_argument("--user-data-dir=C:/Users/Pascal/AppData/Roaming/Mozilla/Firefox/Profiles/iddwgmst.default-release")
browser = webdriver.Firefox(executable_path="C:/Users/Pascal/Desktop/geckodriver.exe", options = options)
browser.get("https://web.whatsapp.com/")
Why does it not work with firefox? The QR-Code comes up every time but I have loaded the firefox profile to the browser/driver so it seems like firefox does not store whatsapp webs data... But then, if I go into whatsapp web in my normal firefox browser, it stores the data again and I don't have to rescan... I am confused by this problem.
I really want it with firefox to be working cause chromedriver does not support emojis :/
Any Ideas?
I solved it. For Firefox it works with:
But for chrome it works with:
Here, geckodriver and chromedriver are in the same folder as the main.py