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

Execute script for all drivers does not work when passed an extremely large results #298

Closed
straker opened this issue Feb 15, 2023 · 2 comments
Labels
playwright playwright integration selenium Selenium integration

Comments

@straker
Copy link
Contributor

straker commented Feb 15, 2023

The execute command for each driver has a maximum allowed character / size length before the driver errors. We need to change how we are injecting the partial for finishRun in order to support extremely large results.

See dequelabs/axe-core-npm#667

@Zidious Zidious added playwright playwright integration selenium Selenium integration labels Feb 15, 2023
@Zidious
Copy link
Contributor

Zidious commented Mar 31, 2023

Ref: #304

@Zidious Zidious closed this as completed Mar 31, 2023
@SantoshDeque
Copy link

Verified in dev branch and with Snapshot builds(4.5.1-SNAPSHOT) for both Selenium and Playwright and the fix is working fine.

Playwright Testcase:

@Test
  public void shouldWorkWithLargeResults() throws Exception {
    String server = "file:///Users/dq_user/Documents/Axe-core/April3-23/axe-core-maven-html/playwright/node_modules/axe-test-fixtures/fixtures/";
    page.navigate(server + "index.html");
    String source = AxeBuilder.getAxeScript() + downloadFromURL(server + "axe-large-partial.js");
    overwriteAxeSourceWithString(source);

    AxeBuilder axeBuilder = new AxeBuilder(page);
    AxeResults axeResults = axeBuilder.analyze();

    assertEquals(axeResults.getPasses().size(), 1);
    assertEquals(axeResults.getPasses().get(0).getId(), "duplicate-id");
  }

Selenium Testcase:

@Test
  public void withLargeResults() {
    webDriver.get(fixture("/index.html"));
    AxeBuilder axeBuilder =
        new AxeBuilder()
            .setAxeScriptProvider(new StringAxeScriptProvider(axePost43x + axeLargePartialJS));

    Results axeResults = axeBuilder.analyze(webDriver);
    AxeReporter.writeResultsToJsonFile("src/test/java/results/Large-results-page", axeResults);
    List<Rule> passes = axeResults.getPasses();

    assertEquals(passes.size(), 1);
    assertEquals(passes.get(0).getId(), "duplicate-id");
  }

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

No branches or pull requests

3 participants