robert
robert

Reputation: 811

Selenium/Chromedriver: Turn off location for a single site

When I run chromedriver, due to my system preferences it turns off "Location" as shown in this image. location being turned off
The problem is an individual site still think my location is allowed. As shown in this image: site thinking location is allowed
When I manually set this drop-down to "block" then I achieve the desired behavior. Any way to do this programmatically? Here is what I've tried adding in the capabilities/preferences from various posts around the internet, none have worked:
--disable-geolocation
--enable-strict-powerful-feature-restrictions
profile.default_content_settings.geolocation: 2
geolocation: 1

Upvotes: 1

Views: 2726

Answers (1)

PDHide
PDHide

Reputation: 19989

--deny-permission-prompts

Prevents permission prompts from appearing by denying instead of showing prompts. ↪

https://peter.sh/experiments/chromium-command-line-switches/

COuld you try adding this as argument example :7

python ;

options.add_argument('--deny-permission-prompts')

Upvotes: 5

Related Questions