First install dependencies with npm or yarn:
npm installOR
yarn installCreate a Node.js program in Javascript/Typescript that uses the Playwright library.
Playwright Documentation: https://playwright.dev/
- Write solution in
solution.ts - Run with
yarn tbin
Find the 3 lowest prices on Amazon.com for each of the following search terms:
-
“nvidia 3060”
-
“nvidia 3070”
-
“nvidia 3080”
Write each search term’s lowest priced products to a CSV file where each row has columns for product and price
How would you generalize this for any search term?
How might you change your design if we needed to search products on a different website?
How might you test this automation? - Talk through this only