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);
