How to use click in puppeteer

I have gone completely brain dead trying to figure this out for an entire day basically I just want to click this element finding it by Class “btn btn-primary tcccLogin_capture_signin_red_link” on this website amoe never used this so I have no idea what I am doing and I’m getting the error IndexOutOfRangeException: Index was outside the bounds of the array. because idk what number to put in the index box

index out of range means the list it got is empty, so when it tries to get the element at index 0 it fails. It’s just a weird way to say “no element matched the selector”.
This is because you’re putting classes like class 1 class2 which is not a valid selector. Use the selector option and put classes like this .class1.class2 etc. all chained by a dot, no spaces, and with a leading dot.

1 Like

Just an add-on, if even after being able to click (it stopped going out of range but nothing happens on the page) it is possible that you must solve some captcha and configure the callbacks correctly, or even trigger some DOM element for the click to work