I'm trying to navigate to Google Maps using selenium webdriver while emulating a different location in Python.
This doesn't seem to work:
from selenium import webdriver
driver = webdriver.Chrome()
params = {
"latitude": 42.1408845,
"longitude": -72.5033907,
"accuracy": 100
}
driver.execute_cdp_cmd("Emulation.setGeolocationOverride", params)
driver.get("https://maps.google.com")
When Google Maps opens, I get my current location rather than the one set in params
.
What am I doing wrong? Using Selenium 4.