Even when I use this code, it opens chrome as a guest user.
Asked
Active
Viewed 32 times
0
-
Did you think about using a UserAgent? May it resolve you problem ? cf https://pypi.org/project/fake-useragent/ – PicxyB Nov 24 '21 at 08:57
-
How is that relevant to this? What problem does it solve? – atomic-coder Nov 24 '21 at 09:16
1 Answers
0
As you are in windows system, you need to pass the name of the WebDriver variant along with the extension, i.e. chromedriver.exe
.
So you need to change the line:
driver = webdriver.Chrome(executable_path=r'C:\foo\bar\chromedriver', options=options)
With:
driver = webdriver.Chrome(executable_path=r'C:\foo\bar\chromedriver.exe', options=options)

undetected Selenium
- 183,867
- 41
- 278
- 352