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?
Most helpful comment