Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Measure rule logs aren't output when the performanceTimer is enabled #1112

Open
1 task done
scribabble opened this issue Aug 21, 2024 · 1 comment
Open
1 task done

Comments

@scribabble
Copy link

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
Copy link
Contributor

Zidious commented Aug 22, 2024

Hey @scribabble!

We'll validate and get back to you shortly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants