I'm using Python with Chromedriver/Selenium. When searching websites using the Chromedriver with mobile emulation enabled, I receive the following error message: "We can't access your GPS location. Set a default location to get better local results."
Image of alert: https://i.stack.imgur.com/HRRjj.png
Is there a setting I can add that will ignore this pop-up or turn off GPS location?
I have tried the following in Python with no luck. It turned off the location in content settings, but that looks to be the wrong place.
'profile.content_settings.exceptions.geolocation': 2
Thanks!
Forgot to mention I tried a few others:
prefs = {
'profile.default_content_setting_values.notifications': 2,
'profile.content_settings.exceptions.notifications': 2,
'profile.managed_default_content_settings.notifications': 2,
'profile.default_content_settings.geolocation': 2,
'profile.default_content_setting_values.geolocation': 2,
'profile.content_settings.exceptions.geolocation': 2,
'profile.managed_default_content_settings.geolocation': 2,
'profile.default_content_setting_values.popups': 2,
'profile.content_settings.exceptions.popups': 2,
'profile.managed_default_content_settings.popups': 2
}
I checked, and these did change the settings in chrome://settings/content, however, the alert still shows.
I'm using chromedriver 2.21, chrome v53 on raspberrypi. This was the only driver I found in ARM arch, so upgrading the chromedriver is not an option as I do not know how to compile it in ARM and haven't found anyone that has yet.
I have tried WebDriverWait with switch_to_alert and dismissing the alert. This actually works, but it hangs. It takes ~5min for WebDriverWait and ~5min to dismiss the alert, then continues normally.