No commit activity in last 3 years
No release in over 3 years
Send RedGlass page archives to DomReactor for automated layout analysis.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
~> 2.14.0

Runtime

 Project Readme

DomReactor + RedGlass

A RedGlass plugin which enables snapshot archives to be analyzed by DomReactor.

Requirements

You will need a DomReactor account and an API token to use DomReactor's automated layout analysis service. Visit http://domreactor.com to sign up.

Usage

# Configurations
browsers = [:firefox, :chrome]
archive_location = '/Users/you/Desktop/red_glass_snapshots'
test_id = 1
page_url = 'http://google.com'
opts = {
    baseline_browser: {name: 'firefox', version: '20.0', platform: 'darwin'},
    threshold: 0.02
}

# Take a RedGlass snapshot in each browser.
browsers.each do |browser|
  listener = RedGlassListener.new
  driver = Selenium::WebDriver.for browser, :listener => listener
  red_glass = RedGlass.new driver, {listener: listener, archive_location: archive_location, test_id: test_id}
  driver.navigate.to page_url
  red_glass.take_snapshot
  driver.quit
end

# Send the page archives to DomReactor.
DomReactorRedGlass.auth_token = '12345'
DomReactorRedGlass.create_chain_reaction("#{archive_location}/#{test_id}", opts)

License

The MIT License - Copyright (c) 2013 Binary Mechanics