UNPKG

nightwatch

Version:

Easy to use Node.js based end-to-end testing solution for web applications using the W3C WebDriver API.

28 lines (19 loc) 848 B
module.exports = { '@disabled': true, 'Show getting Nightwatch features using index': function (client) { client.url('http://nightwatchjs.org'); var featuresPage = client.page.nightwatchFeatures(); featuresPage .assert.textContains('@featuresHeading', 'Main Features') .getFeatureCount(function (result) { client.assert.equal(result.status, 0, 'status counting features'); var totalFeatures = result.value; var lastFeatureIndex = totalFeatures - 1; featuresPage.getText({selector: '@features', index: lastFeatureIndex}, function (result) { client.assert.equal(result.status, 0, 'status finding last feature text'); client.assert.equal(result.value, 'Continous integration support', 'text of last feature'); }); }); client.end(); } };