0

I am building a scraper for a site using Selenium (VBA & Chromedriver). The problem is, I need to log into this site and stay logged in. With my 'normal' browser session, the log-in remains. In selenium, I understand that this is not the case and I need to 'add a cookie' or something.

I would like to not log in programmatically and save a cookie. That seems silly. Because my 'normal' browser already has these details saved SOMEWHERE (AppData??). I just don't know how to point this info to my Selenium driver in code. Any help is appreciated.

vbaToad
  • 31
  • 2

1 Answers1

0

Solved. To point the driver to your 'actual' chrome's user data:

driver.AddArgument ("user-data-dir=C:\Users\USERNAME\AppData\Local\Google\Chrome\User Data")

source: HERE

vbaToad
  • 31
  • 2