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

CLI times out with an unhelpful error if --include element not found #207

Closed
gpaciga opened this issue Mar 12, 2021 · 2 comments
Closed
Assignees
Labels
bug Something isn't working PR A PR has been opened for this issue

Comments

@gpaciga
Copy link

gpaciga commented Mar 12, 2021

When running axe-core/cli, if --include is set to a CSS selector that does not exist on the page, axe will hang until the timeout expires and then report a generic error, suggesting that an issue be filed here.

Expectation: The error message should say that no elements were found to scan

Actual: The user is directed here, suggesting they may have found a bug with axe-core or the CLI itself

Motivation: By being told what the error is, the user won't have to do extra debugging (as I did today for about half an hour before I realized my mistake!)


axe-core/cli version: 4.1.1
+ npx axe --no-color --chrome-options=no-sandbox,disable-gpu --include '#main' https://www.google.ca
Running axe-core 4.1.2 in chrome-headless

Testing https://www.google.ca ... please wait, this may take a minute.
 
An error occurred while testing this page.
Please report the problem to: https://github.com/dequelabs/axe-cli/issues/

Without --include '#main', the scan completes as expected. A similar scan on a page that does have an ID like those also works as expected:

npx axe --no-color --chrome-options=no-sandbox,disable-gpu --include '#page' https://dequeuniversity.com/
@padmavemulapati
Copy link

Validated with the latest @axe-core/cli(4.4.1-alpha.252 )
Seeing the valid error message when we try to add scope analysis on the test page and the selector not found within the page.
image

@Zidious
Copy link
Contributor

Zidious commented Apr 19, 2022

Closing, no docs required.

@Zidious Zidious closed this as completed Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR A PR has been opened for this issue
Projects
None yet
Development

No branches or pull requests

4 participants