0.0
The project is in a healthy, maintained state
Percy visual testing for Ruby Selenium
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 2.0
~> 3.35
~> 0.7.0
~> 13.0
~> 3.5

Runtime

>= 4.0.0.beta1
 Project Readme

percy-selenium-ruby

Gem Version Test

Percy visual testing for Ruby Selenium.

Installation

npm install @percy/cli:

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

gem install Percy selenium package:

$ gem install percy-selenium

Usage

This is an example test using the Percy.snapshot method.

require 'percy'

driver = Selenium::WebDriver.for :firefox
driver.navigate.to "https://example.com"

# Take a snapshot
Percy.snapshot(driver, 'homepage')

driver.quit

Running the test above normally will result in the following log:

[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 -- [ruby test command]
[percy] Percy has started!
[percy] Created build #1: https://percy.io/[your-project]
[percy] Snapshot taken "Ruby example"
[percy] Stopping percy...
[percy] Finalized build #1: https://percy.io/[your-project]
[percy] Done!

Configuration

Percy.snapshot(driver, name[, options])