-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is this still maintained? #92
Comments
/* deno test -A puppet.js
deno.json
{ "nodeModulesDir": "auto" }
*/
import puppeteer from 'npm:puppeteer-core';
import { assert } from "jsr:@std/assert";
const browser = await puppeteer.launch({
slowMo: 250,
devtools: true,
executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
});
const [page] = await browser.pages();
const gotoResult = await page.goto('https://deno.com').catch((err) => err);
if (gotoResult instanceof Error) {
/* 2024-11
problem with error "Not implemented: ClientRequest.options.createConnection"
https://github.com/denoland/deno/issues/19507
*/
const { message = '?!' } = gotoResult;
console.error(`error... "${message}" ${
message.includes('detached') ? 'see https://github.com/denoland/deno/issues/19507' : ''
}`);
await browser.close();
Deno.exit(1);
}
const text = await page.evaluate(() => {
return document.body.querySelector('main h1')?.textContent ?? '';
});
console.log({text});
Deno.test('test stuff', async ()=>{
assert(text.includes('JavaScript'), 'has JavaScript');
});
await browser.close(); previously: import { launch } from "jsr:@astral/astral";
const browser = await launch({
headless: false,
path: '/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome'
});
const page = await browser.newPage("https://deno.com");
const screenshot = await page.screenshot();
Deno.writeFileSync("screenshot.png", screenshot);
await browser.close(); now moving on to do something useful with it... hope this helps |
thx |
I would leave this issue open. This would provide it more visibility I guess |
I gues so, but I would recommend people to move to the official Puppeteer library as deno supports NPM now |
Isn't that it has always been supporting npm? |
Hi there, I'm considering this project for a production product, is this still maintained?
The text was updated successfully, but these errors were encountered: