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

Wraith Capture Issue -PostedbyAbhinav

abhinavguptabsl83 opened this issue · comments

Reporting a problem? Please describe the issue above, and complete the following checklist so that we can help you more quickly.

Issue checklist:

  • [YES ] I have validated my config file against YAML Validator to make sure it is valid YAML.

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

C:>wraith info
DEBUG: #################################################
DEBUG: Command run: info
DEBUG: Wraith version: 4.0.1
DEBUG: Ruby version: ruby 2.4.2p198 (2017-09-14 revision 59899) [i386-mingw32]
DEBUG: ImageMagick: Version: ImageMagick 6.9.9-15 Q16 x64 2017-09-23 http://www.imagemagick.org
DEBUG: PhantomJS version: 1.9.7
DEBUG: CasperJS version: CasperJS not installed
DEBUG: #################################################

  • [YES ] I have run the command in verbose mode (by adding verbose: true to my config) and pasted the output below:

DEBUG: #################################################
DEBUG: Command run: capture configs\ferodo\ferodo-co-uk
DEBUG: Wraith version: 4.0.1
DEBUG: Ruby version: ruby 2.4.2p198 (2017-09-14 revision 59899) [i386-mingw32]
DEBUG: ImageMagick: Version: ImageMagick 6.9.9-15 Q16 x64 2017-09-23 http://www.imagemagick.org
DEBUG: PhantomJS version: 1.9.7
DEBUG: CasperJS version: CasperJS not installed
DEBUG: #################################################
Config validated. No serious issues found.
Creating Folders
SAVING IMAGES
DEBUG: phantomjs 'C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'https://d1enlf36kyc9xc.cloudfront.net/content/loc-emea/loc-gb/fmmp-ferodo/en_GB.htmlproducts.html' '1280' 'D:\Users\703108510\Desktop\AEM Testing\Shots\shots-ferodo-co-uk/products/1280_phantomjs_LIVE.png' 'body' 'C://javascript/disable_javascript--phantom.js' 'false'
DEBUG: phantomjs 'C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://www.ferodo.co.ukproducts.html' '1280' 'D:\Users\703108510\Desktop\AEM Testing\Shots\shots-ferodo-co-uk/products/1280_phantomjs_Prod.png' 'body' 'C://javascript/disable_javascript--phantom.js' 'false'
Loading http://www.ferodo.co.ukproducts.html at dimensions: 1280x1500

Loading https://d1enlf36kyc9xc.cloudfront.net/content/loc-emea/loc-gb/fmmp-ferodo/en_GB.htmlproducts.html at dimensions: 1280x1500

Error with page http://www.ferodo.co.ukproducts.html

Error with page https://d1enlf36kyc9xc.cloudfront.net/content/loc-emea/loc-gb/fmmp-ferodo/en_GB.htmlproducts.html

CROPPING IMAGES
Process.fork is not supported by this Ruby
COMPARING IMAGES
Process.fork is not supported by this Ruby
GENERATING THUMBNAILS
Process.fork is not supported by this Ruby
GENERATING GALLERY
C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/gallery.rb:71:in get_path': undefined method []' for nil:NilClass (NoMethodError)
from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/gallery.rb:65:in figure_out_url' from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/gallery.rb:53:in matcher'
from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/gallery.rb:40:in block (2 levels) in match' from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/gallery.rb:38:in foreach'
from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/gallery.rb:38:in block in match' from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/gallery.rb:35:in each'
from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/gallery.rb:35:in match' from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/gallery.rb:31:in parse_directories'
from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/gallery.rb:142:in generate_gallery' from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/cli.rb:114:in block in generate_gallery'
from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/helpers/utilities.rb:4:in within_acceptable_limits' from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/cli.rb:111:in generate_gallery'
from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/cli.rb:128:in block in capture' from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/helpers/utilities.rb:4:in within_acceptable_limits'
from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/cli.rb:120:in capture' from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/base.rb:466:in start' from C:/rubyinstaller-2.4.2-2-x86/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/bin/wraith:5:in <top (required)>'
from C:/rubyinstaller-2.4.2-2-x86/bin/wraith:23:in load' from C:/rubyinstaller-2.4.2-2-x86/bin/wraith:23:in

'

  • I have pasted the contents of my config file 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 '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:
  LIVE:    "https://d1enlf36kyc9xc.cloudfront.net/content/loc-emea/loc-gb/fmmp-ferodo/en_GB.html"
  Prod:    "http://www.ferodo.co.uk"

# (required) The paths to capture. All paths should exist for both of the domains specified above.
paths:
  products:    products.html
  
  #catalogue:    /catalogue.html

# (required) Screen widths (and optional height) to resize the browser to before taking the screenshot.
screen_widths:
  - 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: 'D:\Users\703108510\Desktop\AEM Testing\Shots\shots-ferodo-co-uk'

# (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
verbose: true
# the next line is required for https capturing
#phantomjs_options: '--ignore-ssl-errors=true --ssl-protocol=tlsv1'