So I want to click on a button on a website. The button has no id, class,... So I should find a way to click the button with the name that's on it. In this example I should click by the name "Supreme®/The North Face® Leather Shoulder Bag"
This is my code in Node.js
const puppeteer = require('puppeteer');
let scrape = async () => {
const browser = await puppeteer.launch({headless: false});
const page = await browser.newPage();
await page.goto('https://www.supremenewyork.com/shop/all/bags');
await page.click(...);
browser.close();
return result;
};
This is the element that I want to click:
<a class="name-link" href="/shop/bags/a9cz4te2r/rsth86fbl">Supreme®/The
North Face® Leather Shoulder Bag</a>