I need to automate geolocation in chrome using python script. I have to fake the latitude and longitude. I followed some links in stackoverflow but they gave errors.
It's actually now progammable by using the Chrome Devtools Protocol (cdp):
params = { "latitude": 50.1109, "longitude": 8.6821, "accuracy": 100 } self.driver = webdriver.Chrome() self.driver.execute_cdp_cmd("Page.setGeolocationOverride", params) self.driver.get('https://www.google.com/maps')