unexpected-ivoryU
Apify & Crawlee3y ago
7 replies
unexpected-ivory

Noob Puppeteer Question

I'm trying to follow Apify's Puppeteer tutorial (https://docs.apify.com/academy/puppeteer-playwright/page/interacting-with-a-page) and getting nowhere. Their example will launch Chromium and execute through the 4th line of the code below. Then nothing. It looks like Google may have changed the page so that the button text that the example is looking for no longer exists. However, even if I replace the selector text to something that is indeed on the page that Chromium loads, noting happens. As in:

await page.click('button:has-text("I agree")');

with:
await page.click('button:has-text("Stay signed out")');

And if I comment out that line, the following line the next line fails to execute as well.

// Type the query into the search box
await page.type('input[title="Search"]', 'hello world');


Is it possible that my Puppeteer install is not complete? Or has something changed on the page that makes the example code outdated?

Thanks!
Learn how to programmatically do actions on a page such as clicking, typing, and pressing keys. Also, discover a common roadblock that comes up when automating.
Interacting with a page | Academy | Apify Documentation
Was this page helpful?