vbv/client/pa11y.js

23 lines
575 B
JavaScript

const pa11y = require("pa11y");
async function runPa11y() {
try {
const results = await pa11y("http://localhost:8000/login?next=/", {
actions: [
"set field #username to admin",
"set field #password to test",
'click element [data-cy="login-button"]',
"wait for path to be /",
"navigate to http://localhost:8000/learn/versicherungsvermittlerin-lp/analyse",
],
});
console.log(results);
// Do something with the results
} catch (error) {
console.log(error);
// Handle the error
}
}
runPa11y();