2020-06-04 14:56:45 +00:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home ](./index.md ) > [puppeteer ](./puppeteer.md ) > [Page ](./puppeteer.page.md ) > [setGeolocation ](./puppeteer.page.setgeolocation.md )
## Page.setGeolocation() method
2020-06-26 07:24:56 +00:00
Sets the page's geolocation.
2020-06-04 14:56:45 +00:00
< b > Signature:< / b >
```typescript
2020-06-26 07:24:56 +00:00
setGeolocation(options: GeolocationOptions): Promise< void > ;
2020-06-04 14:56:45 +00:00
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
2020-06-26 07:24:56 +00:00
| options | [GeolocationOptions ](./puppeteer.geolocationoptions.md ) | |
2020-06-04 14:56:45 +00:00
< b > Returns:< / b >
Promise< void>
2020-06-26 07:24:56 +00:00
## Remarks
Consider using [BrowserContext.overridePermissions() ](./puppeteer.browsercontext.overridepermissions.md ) to grant permissions for the page to read its geolocation.
## Example
```js
await page.setGeolocation({latitude: 59.95, longitude: 30.31667});
```