I do have a tbody which is a pagination menu. So inicially it has numbers from 1 to 10 in a td and then another td with three dots, if I click on this three dots it will generate pages from 11 to 20 and two tds with three dots, one to come back another to go forward. So I inspected it and it shows an a href inside like this:
javascript:__doPostBack('dnn$ctr1205$View$grdvwlstproposicao','Page$9')
.
My question is, how to deal with it using puppeteer? how can I put something like
page.click(dnn$ctr1205$View$grdvwlstproposicao','Page${i})
?
A more detailed, concrete example (preferably complete and runnable) would be nice, but I'm guessing your element looks something like this:
If you want a more general selector that isn't tied to the parameters, you can use something like
'[href*="__doPostBack"]'
, assuming you have a unique parent container available to disambiguate between multiple of these__doPostBack
links, or there's only one__doPostBack
on the page. Other variants are possible depending on your specific use case.