Java + Pa11y + login web page

526 Views Asked by At

I am a beginner to Pa11y. The web application on which I am working needs user login. Once the user logs in then then only the rest of the pages are visible.

Any idea how can I use pa11y to login to the web page and run pa11y on those pages using java ?

We use java in pur project. Is ther any way to achieve this using java and how?

Your help is much appreciated as I could not find any example on internet which uses java + pa11y + web page login

1

There are 1 best solutions below

2
On

Pa11y is a NodeJS application that spins up an instance of a headless browser, injects some JavaScript into the rendered page, then runs a series of tests against that rendered page. It doesn't interact in any way with the server-side technology of your website, so that's why you can't find instructions for using Pa11y with Java.

The Pa11y documentation explains how to log into a webpage using basic auth or through the site's login form. See How can Pa11y log in if my site's behind basic auth? and How can Pa11y log in if my site has a log in form?

Hope this helps!