I have a list of links, and want to click
on one of them based on the name of the link. I can't accomplish this with selectors.
It would be nice to use something like page.$eval
to get the ElementHandle of that item so I can then tap/click it.
The only other approach I can think of is getting the x/y coords within $eval
and then manually clicking on clicking on the location. Seems tedious.
I posted this here per the guidelines, but LMK if we should open a PR on this.
Have you considered use the
page.$$(selector)
to get all your target elments and then usepage.evaluate()
to get thelinkName
, then do the check and click?something like:
Hope it works for you.