All Projects → percy → percy-puppeteer

percy / percy-puppeteer

Licence: MIT license
Visual testing with Puppeteer and Percy

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to percy-puppeteer

percy-webdriverio
Visual testing with WebdriverIO and Percy
Stars: ✭ 25 (-46.81%)
Mutual labels:  visual-testing, percy, visual-tests, percy-sdk
snapshot-action
[Deprecated] A GitHub action to visually test static sites with Percy
Stars: ✭ 14 (-70.21%)
Mutual labels:  visual-testing, percy
jest-puppe-shots
A Jest plugin for creating screenshots of React components with a little help of Puppeteer
Stars: ✭ 86 (+82.98%)
Mutual labels:  visual-testing, puppeteer
percy-agent
[Deprecated in favor of `@percy/cli`] An agent process for integrating with Percy.
Stars: ✭ 21 (-55.32%)
Mutual labels:  visual-testing, percy
puppeteer-autoscroll-down
Handle infinite scroll on websites by puppeteer
Stars: ✭ 40 (-14.89%)
Mutual labels:  puppeteer
puppeteer-proxy
Proxies Puppeteer Page requests.
Stars: ✭ 172 (+265.96%)
Mutual labels:  puppeteer
simplechrome
Webrecorders DevTools Protocol Automation Library
Stars: ✭ 16 (-65.96%)
Mutual labels:  puppeteer
pdf
Micro-service for generating PDF files using Puppeteer with an Express API
Stars: ✭ 16 (-65.96%)
Mutual labels:  puppeteer
instagram-liked-posts-downloader
Download liked (or all) posts from an Instagram profile.
Stars: ✭ 19 (-59.57%)
Mutual labels:  puppeteer
LInkedIn-Reverese-Lookup
🔎Search LinkedIn profile by email address📧
Stars: ✭ 20 (-57.45%)
Mutual labels:  puppeteer
shallty
Let me suck your fucking trash fansub!
Stars: ✭ 30 (-36.17%)
Mutual labels:  puppeteer
purr
PURR (PUppeteer RunneR) is a devops-friendly tool for browser testing and monitoring.
Stars: ✭ 37 (-21.28%)
Mutual labels:  puppeteer
WhatsApp-Bot
🐔 WhatsApp Good Morning
Stars: ✭ 19 (-59.57%)
Mutual labels:  puppeteer
hardcider
🍺 CLI for quickly generating citations for websites and books
Stars: ✭ 17 (-63.83%)
Mutual labels:  puppeteer
puppeteer-botcheck
🕵‍♂ Bot detection tests for Puppeteer. Hide and seek!
Stars: ✭ 42 (-10.64%)
Mutual labels:  puppeteer
akamai-toolkit
A set of tools to work on Akamai v1 anti-bot solution. Current supported version: 1.70
Stars: ✭ 215 (+357.45%)
Mutual labels:  puppeteer
hackernews
This project is based on the book "The Road to React" by Robin Wieruch
Stars: ✭ 19 (-59.57%)
Mutual labels:  percy
simple-headless-browser-serverless
Simple example of how to use Chrome as headless browser on AWS lambda
Stars: ✭ 16 (-65.96%)
Mutual labels:  puppeteer
pdfshot
PDF screenshot generator for web pages
Stars: ✭ 25 (-46.81%)
Mutual labels:  puppeteer
shuttlepdf
📃 Smashingly simple, and scalable ("serverless") HTML to PDF conversions using Google Cloud Functions, and Puppeteer.
Stars: ✭ 15 (-68.09%)
Mutual labels:  puppeteer

@percy/puppeteer

Version Test

Percy visual testing for Google Puppeteer.

Installation

$ npm install --save-dev @percy/cli @percy/puppeteer

Usage

This is an example using the percySnapshot function. For other examples of puppeteer usage, see the Puppeteer docs.

const puppeteer = require('puppeteer');
const percySnapshot = require('@percy/puppeteer');

(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.goto('http://example.com/', { waitUntil: 'networkidle2' });
  await percySnapshot(page, 'Example Site');

  await browser.close();
})();

Running the code above directly will result in the following logs:

$ node script.js
[percy] Percy is not running, disabling snapshots

When running with percy exec, and your project's PERCY_TOKEN, a new Percy build will be created and snapshots will be uploaded to your project.

$ export PERCY_TOKEN=[your-project-token]
$ percy exec -- node script.js
[percy] Percy has started!
[percy] Created build #1: https://percy.io/[your-project]
[percy] Running "node script.js"
[percy] Snapshot taken "Example Site"
[percy] Stopping percy...
[percy] Finalized build #1: https://percy.io/[your-project]
[percy] Done!

Configuration

percySnapshot(page, name[, options])

Upgrading

Automatically with @percy/migrate

We built a tool to help automate migrating to the new CLI toolchain! Migrating can be done by running the following commands and following the prompts:

$ npx @percy/migrate
? Are you currently using @percy/puppeteer? Yes
? Install @percy/cli (required to run percy)? Yes
? Migrate Percy config file? Yes
? Upgrade SDK to @percy/[email protected]? Yes

This will automatically run the changes described below for you.

Manually

Import change

In v1.x there wasn't a default export of the package (only a named export). With v2.x the named export is removed and there is only a default export.

// old
import { percySnapshot } from '@percy/puppeteer';
const { percySnapshot } = require('@percy/puppeteer');

// new
import percySnapshot from '@percy/puppeteer';
const percySnapshot = require('@percy/puppeteer');

Migrating Config

If you have a previous Percy configuration file, migrate it to the newest version with the config:migrate command:

$ percy config:migrate
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].