axe-core-npm icon indicating copy to clipboard operation
axe-core-npm copied to clipboard

@axe-core/cli failing to run tests in command line

Open chekinto opened this issue 3 years ago • 6 comments

When I run the following command to test a site

axe https://www.deque.com

I get the following error message

Screenshot 2022-07-26 at 08 45 48

Product: CLI

Expectation: I expect the command to display any accessibility issues related to the url of the page we wish to test.

Actual: I receive the following error message An error occurred while testing this page. (see image above for error message and details)

Motivation: To use the axe-core/cli tool


axe-core version: N/A
@axe-core/cli: 4.4.3

- Node version: v14.18.1
- Platform:  Mac

chekinto avatar Jul 26 '22 07:07 chekinto

same issue here! :(

RodrigoDLema avatar Jul 27 '22 03:07 RodrigoDLema

Hey all,

Thanks for bringing this to our attention.

Could you please run the below command and let us know what the stack trace outputs:

axe https://www.deque.com/ --show-errors

Zidious avatar Jul 27 '22 03:07 Zidious

Screenshot 2022-07-27 at 10 00 53

chekinto avatar Jul 27 '22 09:07 chekinto

Hey @chekinto,

Please install our @next build, there was a breaking change that Selenium introduced in v4.3.1 removed this function chrome.setDefaultService reference: https://github.com/SeleniumHQ/selenium/pull/10796/files#diff-6c87d95a2288e92e15a6bb17710c763c01c2290e679beb26220858f3218b6a62L260.

Please try the below:

npm i -g @axe-core/cli@next

We will be doing a patch release soon.

Zidious avatar Jul 27 '22 11:07 Zidious

Thank you very much for your help and support

chekinto avatar Jul 27 '22 12:07 chekinto

Validated with the latest version, @axe-core/cli": "^4.4.4-alpha.299" not seeing any error while testing the page. image

padmavemulapati avatar Aug 16 '22 06:08 padmavemulapati

Confirm that npm i -g @axe-core/cli@next fixes the issue:

 npm i -g @axe-core/cli@next

changed 95 packages, and audited 96 packages in 4s

10 packages are looking for funding
  run `npm fund` for details
found 0 vulnerabilities


axe https://www.deque.com/ --show-errors
Running axe-core 4.4.3 in chrome-headless

Testing https://www.deque.com/ ... please wait, this may take a minute.

  Violation of "landmark-no-duplicate-banner" with 1 occurrences!
    Ensures the document has at most one banner landmark. Correct invalid elements at:
     - #CybotCookiebotDialog
    For details, see: https://dequeuniversity.com/rules/axe/4.4/landmark-no-duplicate-banner

  Violation of "landmark-unique" with 2 occurrences!
    Landmarks should have a unique role or role/label/title (i.e. accessible name) combination. Correct invalid elements at:
     - #CybotCookiebotDialog
     - #main-navigation
    For details, see: https://dequeuniversity.com/rules/axe/4.4/landmark-unique

3 Accessibility issues detected.
Testing complete of 1 pages

Please note that only 20% to 50% of all accessibility issues can automatically be detected.
Manual testing is always required. For more information see:
https://dequeuniversity.com/curriculum/courses/testingmethods

steinmb avatar Aug 24 '22 09:08 steinmb

Closing issue please feel free to reopen if relevant

michael-siek avatar Aug 24 '22 18:08 michael-siek