axe-webdriverjs
axe-webdriverjs copied to clipboard
axe-webdriverjs deprecated
I was trying to run axe-reports & got this error: axe-webdriverjs deprecated Error must be handled as the first argument of axe.analyze.
Am I doing something wrong, is this a node issue or what?
Thanks!
I believe you need to pass error and results to the callback function of axeBuilder.analyze:
AxeBuilder(driver).analyze(function(err, results) {
if (err) {
// Handle error somehow
}
console.log(results);
});
Seems the old code may have allowed just results.
As @straker mentioned, you just need to add the error part to the callback function of Analyze
Just a heads up - we're removing support for the deprecated callback signature soon.
This will no longer work:
AxeBuilder(driver).analyze(function(results) {
// ...
})
Instead, you must handle the error:
AxeBuilder(driver).analyze(function(err, results) {
// ...
})