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.
You can use execute_cdp but that is not found in webdriver/remote/remote_connection.py so you could do the following:
webdriver/remote/remote_connection.py
chrome_geolocation_format = { "location": { "latitude": 50.1109, "longitude": 8.6821 } driver.execute(Command.SET_LOCATION, chrome_geolocation_format)