25 lines
686 B
TypeScript
25 lines
686 B
TypeScript
// ⚠️ GENERATED FILE – do not edit directly. Edit the canonical source in skills/web-automation/shared/ and run `pnpm run sync:pi`.
|
||
import { launch } from 'cloakbrowser';
|
||
|
||
async function test() {
|
||
console.log('Launching CloakBrowser with minimal config...');
|
||
|
||
const browser = await launch({
|
||
headless: true,
|
||
humanize: true,
|
||
});
|
||
|
||
console.log('Browser launched');
|
||
const page = await browser.newPage();
|
||
console.log('Page created');
|
||
|
||
await page.goto('https://example.com', { timeout: 30000 });
|
||
console.log('Navigated to:', page.url());
|
||
console.log('Title:', await page.title());
|
||
|
||
await browser.close();
|
||
console.log('Done');
|
||
}
|
||
|
||
test().catch(console.error);
|