dequelabs / axe-webdriverjs

Provides a chainable axe API for Selenium's WebDriverJS and automatically injects into all frames.
Mozilla Public License 2.0
130 stars 46 forks source link

Error must be handled as the first argument of axe.analyze #92

Closed luarmr closed 5 years ago

luarmr commented 5 years ago

It will be great to update this example since is linked from the readme and It will be removed in the next major release.

https://github.com/dequelabs/axe-webdriverjs/blob/05d832cbaf8a53e36c47b56b427de30052c783e2/test/sauce/sauce.js#L31

AxeBuilder(driver)
  .analyze(function(err, results) {
    if (err) {
      // Handle error somehow
    }
      assert.equal(results.url, url);
      done();
  });
stephenmathieson commented 5 years ago

Whoops, missed that in #83.

Feel free to open a PR. Otherwise I'll update the example within a day or so.