โ๏ธ DEPRECATED: Percy now support single element comparaison nativaly. see: https://docs.percy.io/docs/screenshot-a-single-element
The purpose of this library is to provide an API allowing partial content comparaison with Percy via NightWatch.
npm install @maxmattone/percy-nightwatch-element-selection
In nightwatch.conf.js
add the following:
const elementselection = require('@maxmattone/percy-nightwatch-element-selection');
module.exports = {
custom_commands_path: [elementselection.path],
}
browser
.url("https://www.browserstack.com")
.percySnapshotForSelectedElements('BS signup', {elements:'#signupModalButton'})