Socket
Socket
Sign inDemoInstall

eyes.protractor

Package Overview
Dependencies
4
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

eyes.protractor


Version published
Maintainers
1
Install size
6.22 MB
Created

Readme

Source

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()

Keywords

FAQs

Last updated on 01 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc