Skip to content

Instantly share code, notes, and snippets.

@harsha509
Created November 21, 2022 10:37
Show Gist options
  • Save harsha509/e95a896815baf3752b72a35ec730ea75 to your computer and use it in GitHub Desktop.
Save harsha509/e95a896815baf3752b72a35ec730ea75 to your computer and use it in GitHub Desktop.
describe('devtools Test', () => {
it('emulate geo location', async () => {
const coordinates = {
latitude: 35.689487,
longitude: 139.691706,
accuracy: 100,
};
await browser.cdp('Emulation', 'setGeolocationOverride', coordinates)
await browser.url('https://kawasaki-india.com/dealer-locator/');
await browser.pause(10000)
});
});
---
deps:
"@wdio/cli": "^7.26.0",
"@wdio/devtools-service": "^7.26.0",
"@wdio/local-runner": "^7.26.0",
"@wdio/mocha-framework": "^7.26.0",
"@wdio/spec-reporter": "^7.26.0",
"chromedriver": "^107.0.3",
"wdio-chromedriver-service": "^8.0.0"
----
conf:
services: ['devtools'],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment