Right now, Stagehand sometimes tries to call Playwright methods on text nodes instead of elements.
If the HTML markup translates clickable elements into StaticText nodes in the accessibility tree shown to the LLM, the LLM will select the StaticText node, which translates to an XPath targeting the text node like so:
/html[1]/body[1]/div[1]/div[1]/text()[1]
When this happens, Playwright operations will fail -- I set up a simple reproduction of this happening here.