📜  puppeteer 启用位置权限 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:00.058000             🧑  作者: Mango

代码示例1
const context = browser.defaultBrowserContext()
await context.overridePermissions("https://chercher.tech/practice/geo-location", ['geolocation'])
await page.setGeolocation({latitude: parseFloat(latitude), longitude: parseFloat(longtitude)})