diff --git a/integration/google.js b/integration/google.js new file mode 100644 index 0000000..d513172 --- /dev/null +++ b/integration/google.js @@ -0,0 +1,14 @@ +import { connect } from "puppeteer-core"; + +const browser = await connect({ browserWSEndpoint: "ws://127.0.0.1:9222" }); + +const context = await browser.createBrowserContext(); +const page = await context.newPage(); + +await page.goto("https://google.com", { waitUntil: "networkidle0" }); + +await page.type("input.lst", "lightpanda"); +await Promise.all([ + page.waitForNavigation({ waitUntil: "networkidle0" }), + page.keyboard.press("Enter"), +]);