bbc / wraith

Wraith — A responsive screenshot comparison tool

Home Page:http://bbc-news.github.io/wraith/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error while generating gallery

khana25 opened this issue · comments

Hi, I'm getting error while generating gallery after running history and latest commands to get the gallery output.

Issue checklist:

Yaml file is checked and it's a valid yaml file

  • I have run the wraith info command and pasted the output below:

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

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 'history' mode, which is best suited to

making sure your site's appearance remains consistent over

time.

wraith history history.yaml # generate base screenshots

wraith latest history.yaml # take new shots and compare

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

browser: "phantomjs"

(required) The domain to take screenshots of.

domains:
live: "https://www.abc.co.uk"

(required) The paths to capture. This particular config is using casperjs, so we can take screenshots of selectors rather than the entire page.

paths:
home: "/"
about: "/about"

(optional) JavaScript file to execute before taking the screenshot of this path.

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

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

screen_widths:

  • 320x568 #iPhone 5
  • 375x667 # iPhone 6/7/8
  • 414x736 # iPhone 6/7/8plus

(optional) Resize to each screen width (efficient), or reload at each screen width (costly). Default: 'reload'

#resize_or_reload: 'resize'

(required for history mode, otherwise optional) The directory that your base screenshots will be stored in.

history_dir: 'Z:/wraithResults/results/uat/history/abc/shots_base'

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

directory: 'Z:/wraithResults/results/uat/history/abc/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: 1

(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_only

(optional) Choose to run Wraith in verbose mode, for easier debugging. Default: false

verbose: true

(optional) Color to highlight the image diff. Default: 'blue'

highlight_color: red

(optional) Parameters to pass to Phantom/Casper command line. Default: '--ignore-ssl-errors=true --ssl-protocol=tlsv1'

phantomjs_options: '--ignore-ssl-errors=true --ssl-protocol=tlsv1'

Results here:
D:/Ruby22/lib/ruby/gems/2.2.0/gems/wraith-4.2.1/lib/wraith/folder.rb:77:inblock (2 levels) in tidy_shots_folder': undefined method >' for nil:NilClass (NoMethodError) from D:/Ruby22/lib/ruby/gems/2.2.0/gems/wraith-4.2.1/lib/wraith/folder.rb:77:in each'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/wraith-4.2.1/lib/wraith/folder.rb:77:in none?' from D:/Ruby22/lib/ruby/gems/2.2.0/gems/wraith-4.2.1/lib/wraith/folder.rb:77:in block in tidy_shots_folder'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/wraith-4.2.1/lib/wraith/folder.rb:76:in each' from D:/Ruby22/lib/ruby/gems/2.2.0/gems/wraith-4.2.1/lib/wraith/folder.rb:76:in tidy_shots_folder'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/wraith-4.2.1/lib/wraith/gallery.rb:43:in match' from D:/Ruby22/lib/ruby/gems/2.2.0/gems/wraith-4.2.1/lib/wraith/gallery.rb:31:in parse_directories'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/wraith-4.2.1/lib/wraith/gallery.rb:142:in generate_gallery' from D:/Ruby22/lib/ruby/gems/2.2.0/gems/wraith-4.2.1/lib/wraith/cli.rb:114:in block in generate_gallery'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/wraith-4.2.1/lib/wraith/helpers/utilities.rb:4:in within_acceptable_limits' from D:/Ruby22/lib/ruby/gems/2.2.0/gems/wraith-4.2.1/lib/wraith/cli.rb:111:in generate_gallery'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/wraith-4.2.1/lib/wraith/cli.rb:164:in block in latest' from D:/Ruby22/lib/ruby/gems/2.2.0/gems/wraith-4.2.1/lib/wraith/helpers/utilities.rb:4:in within_acceptable_limits'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/wraith-4.2.1/lib/wraith/cli.rb:155:in latest' from D:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' from D:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/base.rb:466:in start' from D:/Ruby22/lib/ruby/gems/2.2.0/gems/wraith-4.2.1/bin/wraith:5:in <top (required)>'
from D:/Ruby22/bin/wraith:23:in load' from D:/Ruby22/bin/wraith:23:in

'