Socket
Socket
Sign inDemoInstall

@applitools/eyes

Package Overview
Dependencies
Maintainers
45
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/eyes


Version published
Weekly downloads
146K
decreased by-3.12%
Maintainers
45
Weekly downloads
 
Created

What is @applitools/eyes?

@applitools/eyes is a visual testing and monitoring service that helps ensure your web and mobile applications look as intended. It automates the process of visual validation by comparing screenshots of your application against a baseline, highlighting any visual differences.

What are @applitools/eyes's main functionalities?

Visual Testing

This feature allows you to perform visual testing by capturing screenshots of your application and comparing them against a baseline to detect visual differences.

const { Eyes, Target } = require('@applitools/eyes-selenium');
const { Builder } = require('selenium-webdriver');

(async () => {
  const eyes = new Eyes();
  eyes.setApiKey('YOUR_API_KEY');

  const driver = new Builder().forBrowser('chrome').build();

  try {
    await eyes.open(driver, 'App Name', 'Test Name');
    await driver.get('https://example.com');
    await eyes.check('Main Page', Target.window());
    await eyes.close();
  } finally {
    await driver.quit();
    await eyes.abortIfNotClosed();
  }
})();

Cross-Browser Testing

This feature allows you to perform visual testing across different browsers and viewports, ensuring your application looks consistent across various environments.

const { Eyes, Target, BatchInfo } = require('@applitools/eyes-selenium');
const { Builder } = require('selenium-webdriver');

(async () => {
  const eyes = new Eyes();
  eyes.setApiKey('YOUR_API_KEY');
  eyes.setBatch(new BatchInfo('Cross-Browser Batch'));

  const browsers = [
    { width: 800, height: 600, name: 'chrome' },
    { width: 800, height: 600, name: 'firefox' },
    { width: 800, height: 600, name: 'safari' }
  ];

  for (const browser of browsers) {
    const driver = new Builder().forBrowser(browser.name).build();
    try {
      await eyes.open(driver, 'App Name', 'Cross-Browser Test', browser);
      await driver.get('https://example.com');
      await eyes.check('Main Page', Target.window());
      await eyes.close();
    } finally {
      await driver.quit();
      await eyes.abortIfNotClosed();
    }
  }
})();

Mobile App Testing

This feature allows you to perform visual testing on mobile applications, ensuring that your app's UI looks correct on different devices and screen sizes.

const { Eyes, Target } = require('@applitools/eyes-appium');
const { remote } = require('webdriverio');

(async () => {
  const eyes = new Eyes();
  eyes.setApiKey('YOUR_API_KEY');

  const driver = await remote({
    capabilities: {
      platformName: 'Android',
      deviceName: 'emulator-5554',
      app: '/path/to/your/app.apk'
    }
  });

  try {
    await eyes.open(driver, 'App Name', 'Mobile Test');
    await eyes.check('Main Screen', Target.window());
    await eyes.close();
  } finally {
    await driver.deleteSession();
    await eyes.abortIfNotClosed();
  }
})();

Other packages similar to @applitools/eyes

Keywords

FAQs

Package last updated on 12 Sep 2023

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc