CodeLeom / puppeteer-tutorial

Puppeteer tutorial: submitting forms, clicking buttons, and handling inputs

Home Page:https://blog.apify.com/puppeteer-submit-forms/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Puppeteer tutorial: submitting forms, clicking buttons, and handling inputs

Article to Read

After cloning this project, run npm install which will install the necessary dependencies for your project.

Next step, open the code with your desired code editor and run the index.html file if you want to use the local url, but I have included a hosted domain.

If you want, you can replace the url on line 13 in the index.js while line 15 in the signup.js file with your desired url.

You can change the check that I am using to determine a successful action to what your url has, but if you are using my default url, you are good to go.

Once you are done, run node index.js or node signup.js.

Watch your terminal for the output.

Puppeteer Tutorial for taking screenshot & Generating PDF

Added to this code is also a code for you to take screenshot of website or or generate pdf from the website.

Multiple page screenshots

Create a sepreate folder called images, all the screenshots will be saved into the folder when you run the batch.js file.

About

Puppeteer tutorial: submitting forms, clicking buttons, and handling inputs

https://blog.apify.com/puppeteer-submit-forms/


Languages

Language:JavaScript 89.8%Language:HTML 10.2%