Measure rule logs aren't output when the performanceTimer is enabled
Opened this issue · 1 comments
scribabble commented
Product
playwright
Product Version
4.10.0
Latest Version
- I have tested the issue with the latest version of the product
Issue Description
Expectation
When enabling the performanceTimer
option in the AxeBuilder, I expect that the output would include various "Measure rule..." logs (like seen here) that tell how much time was spent evaluating each rule.
Actual
No "Measure rule..." logs are given, instead only the "gather" logs are written.
How to Reproduce
import AxeBuilder from "@axe-core/playwright";
import playwright = require("playwright");
(async () => {
const browser = await playwright.chromium.launch({ headless: true });
const context = await browser.newContext();
const page = await context.newPage();
page.on("console", (msg) => {
console.info(`[BROWSER CONSOLE] ${msg.text()}`);
});
console.info(`Loading page...`);
await page.goto("https://google.com");
console.info(`Analyzing page...`);
await new AxeBuilder({ page })
.options({
performanceTimer: true,
})
.withTags(["wcag2a", "wcag2aa"])
.analyze();
console.info(`Done analyzing!`);
await browser.close();
})();
Example output
Debugger attached.
Loading page...
Analyzing page...
[BROWSER CONSOLE] gather ( 0 ): 17ms
[BROWSER CONSOLE] gather ( 11 ): 21.599999994039536ms
[BROWSER CONSOLE] gather ( 0 ): 22.700000002980232ms
...
[BROWSER CONSOLE] gather ( 0 ): 76.59999999403954ms
[BROWSER CONSOLE] gather ( 0 ): 76.59999999403954ms
[BROWSER CONSOLE] gather ( 0 ): 208.20000000298023ms
Done analyzing!
Waiting for the debugger to disconnect...
Additional context
- playwright version: 1.46.1
- I haven't checked this issue against every @axe-core/playwright version, but this seems to have been working back in 4.2.2, but has the same broken functionality described in this issue from 4.4.5 and above.
- I'd be happy to try and fix the bug myself at some point, but can't make any promises on if/when I'd be able to do that.
Zidious commented
Hey @scribabble!
We'll validate and get back to you shortly!