mattonem / percy-element-selection-nightwatchjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

⛔️ DEPRECATED: Percy now support single element comparaison nativaly. see: https://docs.percy.io/docs/screenshot-a-single-element

percy-element-selection-nightwatchjs

The purpose of this library is to provide an API allowing partial content comparaison with Percy via NightWatch.

How to use

Install

npm install @maxmattone/percy-nightwatch-element-selection

Setup

In nightwatch.conf.js add the following:

const elementselection = require('@maxmattone/percy-nightwatch-element-selection');
module.exports = {
  custom_commands_path:  [elementselection.path],
  }

How to use

browser
    .url("https://www.browserstack.com")
    .percySnapshotForSelectedElements('BS signup', {elements:'#signupModalButton'})

About

License:MIT License


Languages

Language:JavaScript 100.0%