You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to write a custom Lighthouse audit that checks the accessibility text of all buttons on a webpage. To achieve this, I created a custom Gatherer that collects all button elements. However, when running the audit, I encounter the following error:
evaluateAsync is an older function for running JS inside the page from a gatherer. Can you try the newer function (evaluate) and report back? It should be something like this (untested):
Description
I am trying to write a custom Lighthouse audit that checks the accessibility text of all buttons on a webpage. To achieve this, I created a custom Gatherer that collects all button elements. However, when running the audit, I encounter the following error:
🚨 Error Output in Lighthouse Console:
LH:LinksInButtons:error Runtime.evaluate exception LH:LinksInButtons:error Expression: (() => { return Array.from(document.querySelectorAll("button")).map(button => ({ text: button.textCo LH:LinksInButtons:error ---- (elided) LH:LinksInButtons:error Parse error at: 11:270 LH:LinksInButtons:error SyntaxError: missing ) after argument list +1ms
📌 My Current Gatherer Code:
✅ Simplified Code That Works (But Wrong Output)
After simplifying the code, I no longer get errors, but the output is different than what I expect.
Expected Output (From DevTools Console Query)
When I manually run:
I get
But from Lighthouse I get
❓ Questions
The text was updated successfully, but these errors were encountered: