This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

eyes.protractor

0.0.57 • Public • Published

Eyes.Protractor

Applitools Eyes SDK For Protactor

Example:


Change this example:

describe('angularjs homepage', function() {
    it('should add one and two', function() {
        browser.get('http://juliemr.github.io/protractor-demo/');
        element(by.model('first')).sendKeys(1);
        element(by.model('second')).sendKeys(2);
        element(by.id('gobutton')).click();
        expect(element(by.binding('latest')).getText()).
            toEqual('3');
    });
});

To this:

var Eyes = require('eyes.protractor').Eyes;
var eyes = new Eyes();
eyes.setApiKey("<YOUR_API_KEY>");
 
describe('angularjs homepage', function() {
    it('should add one and two', function() {
        eyes.open(browser, "JavaScript SDK", "Simple Protractor Test");
        browser.get('http://juliemr.github.io/protractor-demo/');
        eyes.checkWindow("Demo start");
        element(by.model('first')).sendKeys(1);
        element(by.model('second')).sendKeys(2);
        eyes.checkWindow("Input Ready");
        element(by.id('gobutton')).click();
        eyes.checkWindow("Result");
 
        expect(element(by.binding('latest')).getText()).
            toEqual('3');
 
        eyes.close();
    });
});
 

Note: older Protractor versions may require passing protractor.getInstance().driver instead of browser to eyes.open()

Package Sidebar

Install

npm i eyes.protractor

Weekly Downloads

1,545

Version

0.0.57

License

Apache-2.0

Last publish

Collaborators

  • amitzur
  • applitools-admin
  • applitools-readonly