Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

axe-webdriverjs deprecated #146

Open
mgifford opened this issue Mar 6, 2020 · 3 comments
Open

axe-webdriverjs deprecated #146

mgifford opened this issue Mar 6, 2020 · 3 comments

Comments

@mgifford
Copy link

mgifford commented Mar 6, 2020

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!

@straker
Copy link
Contributor

straker commented Mar 9, 2020

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.

@manoj9788
Copy link

As @straker mentioned, you just need to add the error part to the callback function of Analyze

@stephenmathieson
Copy link
Member

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) {
  // ...
})

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants