Puppeteer: How to return ElementHandle from page.evaluate?

Created on 20 Oct 2017  路  1Comment  路  Source: puppeteer/puppeteer

I need to find a DOM node that contains a specific text. page.$ is not sufficient here because querySelector does not allow :contains query. Therefore, I need to use XPath,
which requires to evaluate query using document.evaluate. To evaluate document.evaluate I need to use page.evaluate.

How do I return a ElementHandle reference from page.evaluate?

>All comments

Was this page helpful?
0 / 5 - 0 ratings

Related issues

denniscieri picture denniscieri  路  3Comments

aslushnikov picture aslushnikov  路  3Comments

sradu picture sradu  路  3Comments

namma-geniee picture namma-geniee  路  3Comments

sheweichun picture sheweichun  路  3Comments