Does Puppeteer have support for Ember dynamic selectors?
The Ember framework provides each element with a unique id in the format ember2599.
Is there a way to select the nth ember* element? or some other method?
Any code example is appreciated.
Thanks!
Would also like to know this :) It was mentioned that #382 would fix this, but I'm still not sure how 🤔
Untested code ahead!
function nthEmberElement(n) {
return page.evaluateHandle(n => Array.from(document.querySelectorAll('*')).filter(element => element.id.startsWith('ember'))[n], n);
}
await (await nthEmberElement(5)).click();
Super helpful @JoelEinbinder! Thanks!
Most helpful comment
Untested code ahead!