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

Support passing --debug to pa11y #180

Open
kussmaul opened this issue Nov 5, 2021 · 5 comments
Open

Support passing --debug to pa11y #180

kussmaul opened this issue Nov 5, 2021 · 5 comments
Milestone

Comments

@kussmaul
Copy link

kussmaul commented Nov 5, 2021

I have a set of Pa11y tests (run from pa11y-ci), each with a url and a set of actions to set fields, click elements, and wait for paths to change or other conditions. When I run/debug these tests, I often get messages like this, and then have to figure out which action caused the problem.

http://localhost:4200/some-path - Failed to run
Errors in http://localhost:4200/some-path:
 • Error: Pa11y timed out (30000ms)

More informative messages would be nice, but for now I use screen capture every few actions to trace what happens. I think it would be convenient and not difficult to add an action that writes text to the console. Something like console log <message> or write text <message>. This could even be extended to console error <message> or write url or write field <selector>.

Does this seem worth doing? Thoughts on syntax?

@joeyciechanowicz
Copy link
Member

The debug flag (-d) should print out the actions as they're ran.

@kussmaul
Copy link
Author

kussmaul commented Nov 6, 2021

Thank you, @joeyciechanowicz. The debug flag works for pa11y but not pa11y-ci.
Should I propose adding it to pa11y-ci? (similar to #73)
A more general write action could have other uses, especially if it could extract info from a page.

@joeyciechanowicz
Copy link
Member

I think if we were to support passing the --debug flag to pa11y from pa11y-ci then we could avoid adding a new action?

@kussmaul
Copy link
Author

kussmaul commented Nov 8, 2021

Yes, pa11y-ci --debug would handle my use case.

@josebolos
Copy link
Member

Moving issue to the pa11y-ci repo.

@josebolos josebolos transferred this issue from pa11y/pa11y Apr 8, 2022
@danyalaytekin danyalaytekin changed the title request: add action(s) to write text to console Support passing --debug to pa11y Mar 22, 2024
@danyalaytekin danyalaytekin added this to the 4.x milestone Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants