-
Notifications
You must be signed in to change notification settings - Fork 264
Open
Description
Tried to test javascript execution like that:
import puppeteer from 'puppeteer-core'
import * as fs from "node:fs";
const browser = await puppeteer.connect({
browserWSEndpoint: "ws://127.0.0.1:9222",
})
const context = await browser.createBrowserContext()
const page = await context.newPage()
await page.goto('https://timeanddate.com/timer/')
await page.click(".c-timer__btn--start")
// ...
but it seems like scripts can't load due to the error:
info(telemetry): telemetry enabled
info(server): accepting new conn...
info(server): client connected
info(http_client): redirecting to: GET https://www.timeanddate.com/timer/
info(browser): GET https://www.timeanddate.com/timer/ 200
info(browser): fetch https://c.tadst.com/com/common/wcommon_33.js: 200
info(browser): eval script //c.tadst.com/com/common/wcommon_33.js: TypeError: q.style.setProperty is not a function
info(browser): fetch https://www.timeanddate.com/common/ext/knockout-3.2.0.js: 200
info(browser): fetch https://c.tadst.com/com/common/tadsortable_8.js: 200
info(browser): fetch https://c.tadst.com/com/common/timer_22.js: 200
info(browser): fetch https://securepubads.g.doubleclick.net/tag/js/gpt.js: 200
info(browser): fetch https://c.amazon-adsystem.com/aax2/apstag.js: 200
info(browser): fetch https://btloader.com/tag?o=5174239513018368&upapi=true: 200
Maybe to introduce the possibility to mock some APIs with Proxy objects?
Metadata
Metadata
Assignees
Labels
No labels