Git Product home page Git Product logo

Comments (1)

kmadan92 avatar kmadan92 commented on September 1, 2024

Capture.yaml file:

##############################################################
##############################################################

This is an example configuration provided by Wraith.

Feel free to amend for your own requirements.

---

This particular config is intended to demonstrate how

to use Wraith in 'capture' mode, which is best suited to

comparing a test and live version of the same website.

wraith capture capture.yaml

##############################################################
##############################################################

(required) The engine to run Wraith with. Examples: 'phantomjs', 'casperjs', 'slimerjs'

browser: "phantomjs"

(required) The domains to take screenshots of.

domains:
my_site: "http://www.example.com"
my_other_site: "http://www.test.example.com"

(required) The paths to capture. All paths should exist for both of the domains specified above.

paths:
#home: /
#about: /about
#contact: /get-in-touch

(required) Screen widths (and optional height) to resize the browser to before taking the screenshot.

screen_widths:

  • 320
  • 600x768
  • 768
  • 1024
  • 1280

(optional) JavaScript file to execute before taking screenshot of every path. Default: nil

before_capture: 'javascript/disable_javascript--phantom.js'

(required) The directory that your screenshots will be stored in

directory: 'shots'

(required) Amount of fuzz ImageMagick will use when comparing images. A higher fuzz makes the comparison less strict.

fuzz: '20%'

(optional) The maximum acceptable level of difference (in %) between two images before Wraith reports a failure. Default: 0

threshold: 5

(optional) Specify the template (and generated thumbnail sizes) for the gallery output.

gallery:
template: 'slideshow_template' # Examples: 'basic_template' (default), 'slideshow_template'
thumb_width: 200
thumb_height: 200

(optional) Choose which results are displayed in the gallery, and in what order. Default: alphanumeric

Options:

alphanumeric - all paths (with or without a difference) are shown, sorted by path

diffs_first - all paths (with or without a difference) are shown, sorted by difference size (largest first)

diffs_only - only paths with a difference are shown, sorted by difference size (largest first)

Note: different screen widths are always grouped together.

mode: diffs_first

(optional) Set the number of threads to use when saving images. Raising this value can improve performance, but very high

values can lead to server connection issues. Set to around 1.5 the available CPU cores for best performance. Default: 8

threads: 8
verbose: true

from wraith.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.