Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@applitools/ufg-client

Package Overview
Dependencies
Maintainers
33
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/ufg-client

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
252K
decreased by-33.18%
Maintainers
33
Weekly downloads
 
Created

What is @applitools/ufg-client?

@applitools/ufg-client is a client library for Applitools' Ultrafast Grid, which is a cloud-based platform for visual testing and cross-browser testing. It allows developers to capture screenshots of web pages and compare them against a baseline to detect visual differences. The package provides functionalities for setting up tests, capturing screenshots, and managing test results.

What are @applitools/ufg-client's main functionalities?

Setup and Configuration

This code demonstrates how to set up and configure the Visual Grid client with an API key and server URL.

const { makeVisualGridClient } = require('@applitools/ufg-client');

const visualGridClient = makeVisualGridClient({
  apiKey: 'YOUR_API_KEY',
  serverUrl: 'https://eyesapi.applitools.com',
});

Capture Screenshots

This code demonstrates how to capture a screenshot of a web page using the Visual Grid client. It opens a new test, captures a screenshot of the main page, and then closes the test.

const { makeVisualGridClient } = require('@applitools/ufg-client');

const visualGridClient = makeVisualGridClient({
  apiKey: 'YOUR_API_KEY',
});

async function captureScreenshot() {
  const eyes = visualGridClient.openEyes({
    appName: 'My App',
    testName: 'My Test',
  });

  await eyes.checkWindow({
    tag: 'Main Page',
    target: 'window',
  });

  await eyes.close();
}

captureScreenshot();

Manage Test Results

This code demonstrates how to manage test results. It captures a screenshot and then logs the test results to the console.

const { makeVisualGridClient } = require('@applitools/ufg-client');

const visualGridClient = makeVisualGridClient({
  apiKey: 'YOUR_API_KEY',
});

async function manageResults() {
  const eyes = visualGridClient.openEyes({
    appName: 'My App',
    testName: 'My Test',
  });

  await eyes.checkWindow({
    tag: 'Main Page',
    target: 'window',
  });

  const results = await eyes.close();
  console.log(results);
}

manageResults();

Other packages similar to @applitools/ufg-client

FAQs

Package last updated on 23 Sep 2022

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