user15594988
user15594988

Reputation:

How to click on a label with puppeteer

I have this label in html:

<label for="tamanhoIndisponivel">

The label I want to click on is on this page https://www.nike.com.br/chuteira-nike-premier-2-sala-unissex-153-169-171-309321

Note:

I already have all my code ready, I just need a piece of code so I can click on this element How can I click on the label with puppeteer?

Upvotes: 0

Views: 1257

Answers (1)

dangi13
dangi13

Reputation: 1275

If you just want the code to click then this should be enough in your case if you have the correct locator

 await (await page.waitForSelector('label[for=tamanhoIndisponivel]')).click()

Upvotes: 2

Related Questions