Errors with clicking on a checkbox with Puppeteer

Solution for Errors with clicking on a checkbox with Puppeteer
is Given Below:

I’ve been having issues clicking on a checkbox on Footlocker Au’s checkout page. I have tried to search it up online and have tried using selector and xpath but both does not work.

This is what I have used, but I have tried the standard
await" ");

Site :!searchCategory=men

await page.evaluate(() => {
   document.querySelector("body > main > div > div.fl-checkout > form > div > div.fl-checkout--content-container--address-block > div.fl-checkout--content-container--address-block--options-field > div:nth-child(3) > div > div > label").click();

You could target the input directly and click that instead.
The selector could be simplified greatly using the id instead of this insanely long and probably inaccurate selector.


You could even target the label if you needed to:


I had a similar issue a while back, I was intercepting unnecessary request (eg: stylesheets, fonts …etc) which was affecting the overall aspect of the page and messing up the await" "); capability. That’s because await" "); is mimicking human behavior. If it’s not clickable for a human, it’s not for puppeteer (in short).

To go around that instead I used:

page.$eval(`YourSelectorPath`, element =>;