Skip to content

Instantly share code, notes, and snippets.

@muditlambda
Created July 2, 2020 14:36
#execute_cdp_cmd for Geolocation testing with Selenium
self.latitude = 42.1408845
self.longitude = -72.5033907
self.accuracy = 100
driver.maximize_window()
driver.execute_cdp_cmd("Emulation.setGeolocationOverride", {
"latitude": self.latitude,
"longitude": self.longitude,
"accuracy": self.accuracy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment