DEV Community

Zain Ahmad
Zain Ahmad

Posted on

Puppeteer works locally but do not work on ec2 instance

Hi,
I am working on puppeteer. It works on local host and successfully logs into the site. But when I use the same code and deploy it to AWS it do not work. It simply says element not found.

Top comments (1)

Collapse
 
uzair004 profile image
Muhammad Uzair

You might have to wait for navigation before you access something in page context.

Try putting page.waitForNavigation() between accessing elements of different pages.