You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.
I am trying to do some accessibility testing for a web app and am currently stuck with the following issue. TypeError: nemo.accessibility.scan(...).then is not a function
The versions of node and node modules used are as below.
node 8.9.4
"mocha": "4.1.0",
"nemo": "3.0.1",
"nemo-accessibility": "2.0.1",
"nemo-view": "2.2.3"
I have confirmed AATT server is up and running on localhost:3000.
below is the example code that will reproduce the error. spec.js
var basedir = require('path').resolve(__dirname, '..');
var Nemo = require('nemo');
var nemo;
describe('accessibility test suite', function () {
before(function (done) {
nemo = Nemo(basedir, function (err) {
if (err) {
return done(err);
}
done();
});
});
after(function (done) {
nemo.driver.quit().then(done);
});
it('should automate the browser', function (done) {
nemo.driver.get(nemo.data.baseUrl);
nemo.driver.sleep(3000);
nemo.accessibility.scan().then(function (result) {
var file = process.cwd() + '/example/report/entirePage.html';
fs.writeFile(file, result, function (err) {
console.log('Successfully wrote the file ' + file);
});
});
nemo.driver.sleep(3000).then(function () {
done();
}, function (err) {
done(err);
})
});
});
run the test node_modules/.bin/mocha test/functional/spec/*.js --timeout 30000 --reporter spec
error TypeError: nemo.accessibility.scan(...).then is not a function
Looks like for some reason, scanElement in nemo-accessibility module is not returning a promise. I have tried specifying a particular element using the 'element' option but that also did not help.
The text was updated successfully, but these errors were encountered:
We are using webdriver promise manager in nemo-accessibility and it is deprecated in selenium 3.x (since you are using nemo 3.x). Will need to fix this and publish nemo-accessibility@3.x, will work on this soon and update it here
I am trying to do some accessibility testing for a web app and am currently stuck with the following issue.
TypeError: nemo.accessibility.scan(...).then is not a function
The versions of node and node modules used are as below.
node 8.9.4
"mocha": "4.1.0",
"nemo": "3.0.1",
"nemo-accessibility": "2.0.1",
"nemo-view": "2.2.3"
I have confirmed AATT server is up and running on localhost:3000.
below is the example code that will reproduce the error.
spec.js
config.json
run the test
node_modules/.bin/mocha test/functional/spec/*.js --timeout 30000 --reporter spec
error
TypeError: nemo.accessibility.scan(...).then is not a function
Looks like for some reason, scanElement in nemo-accessibility module is not returning a promise. I have tried specifying a particular element using the 'element' option but that also did not help.
The text was updated successfully, but these errors were encountered: