To test the permission-denied flow, create the context without granting 'geolocation' and verify the app handles the error state correctly
For additional permissions such as notifications or camera, add them to the permissions array: ['geolocation', 'notifications']
Confirm the emulated coordinates are visible in the page by evaluating navigator.geolocation as a page function if needed
Known gotchas
setGeolocation() updates all pages in the context simultaneously; if your test opens multiple tabs expecting different locations, use separate browser contexts
HTTPS is required for the Geolocation API in most browsers; using HTTP in tests will cause getCurrentPosition() to fail regardless of emulation settings
Permission grants are context-scoped and reset when the context is closed; do not rely on persisted permissions across test files without re-granting them
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp