Automation with Love

For those who are interested in automating the stuffs, CI/CD pipeline, automation test..

Follow publication

Member-only story

Crawler

Using Playwright to crawl data

Simple example for using Playwright to crawl data from websites.

Donald Le
Automation with Love
Oct 27, 2021
Photo by Lucas Ludwig on Unsplash

In software world today, there’s a lot of existing data in the web that we could benefit from. So crawling data is often a necessary step in software development, especially for data driven applications. In this article, we will go over for how Playwright can help us to do this task. We will try to crawl data from AWS application which requires authentication step.

Playwright has a feature that can reuse cookies data, we can setup states for our application beforehand and reuse it later. This can save us a lot of time from set things up.

Then reuse it

Crawl data from site by accessing to its elements and save data to csv file

Run the test with playwright cli

npx playwright test tests/crawler.spec.ts

Hope this helps.

Happy coding guys.

Cheers!

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Automation with Love
Automation with Love

Published in Automation with Love

For those who are interested in automating the stuffs, CI/CD pipeline, automation test..

Donald Le
Donald Le

Written by Donald Le

A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.

No responses yet

Write a response