Navigation
Puppeteer
Playwright
Clicking and typing
Puppeteer
Playwright
Waiting for elements
Puppeteer
Playwright
Extracting text
Puppeteer
Playwright
Taking a screenshot
Puppeteer
Playwright
Working with multiple pages
Puppeteer
Playwright
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
console.log(await page.title());
console.log(page.url());
await page.goto('https://example.com', wait_until='domcontentloaded')
print(await page.title())
print(page.url)
await page.click('#search-input');
await page.type('#search-input', 'hello world');
await page.click('#submit-button');
await page.click('#search-input')
await page.type('#search-input', 'hello world')
await page.click('#submit-button')
await page.waitForSelector('.results', { timeout: 5000 });
await page.wait_for_selector('.results', timeout=5000)
const text = await page.$eval('.price', el => el.innerText);
text = await page.locator('.price').inner_text()
await page.screenshot({ path: 'screenshot.png' });
await page.screenshot(path='screenshot.png')
const page2 = await browser.newPage();
await page2.goto('https://example.com/other');
page2 = await browser.new_page()
await page2.goto('https://example.com/other')
Was this page helpful?