No results for

Powered byAlgolia
⚠️ This is archived documentation for v0.45. Go to the latest version

setGeolocation(geolocation)

attention

This feature has known issues. For details, refer to #435.

Sets the context's geolocation.

ParameterTypeDefaultDescription
geolocation
objectnull

Example

import { chromium } from 'k6/experimental/browser';
export default function () {
const browser = chromium.launch();
const context = browser.newContext();
context.setGeolocation({latitude: 59.95, longitude: 30.31667});
}