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 History: Screenshot are completly white

toonhoremans opened this issue · comments


I'm using the Wraith history mode and when I try to test a local site on my localhost it works perfectly fine but when I try to test an other site which is running in docker but still local the screenshots are all completly white.
I have tried to add a delay (up to 100 000 ms) but it makes no difference.

Issue checklist:

  • 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:

DEBUG: #################################################
DEBUG:   Command run:        info
DEBUG:   Wraith version:     4.2.4
DEBUG:   Ruby version:       ruby 2.6.5p114 (2019-10-01 revision 67812) [i386-mingw32]
DEBUG:   ImageMagick:        Version: ImageMagick 7.0.9-2 Q16 x64 2019-10-30 http://www.imagemagick.org
DEBUG:   PhantomJS version:  2.1.1
DEBUG:   chromedriver version:  ChromeDriver 79.0.3945.36 (3582db32b33893869b8c1339e8f4d9ed1816f143-refs/branch-heads/3945@{#614})
DEBUG:   CasperJS version:   1.1.4
DEBUG: #################################################

  • I have run the command in verbose mode (by adding verbose: true to my config) and pasted the output below:
DEBUG: #################################################
DEBUG:   Command run:        history configs/history.yaml
DEBUG:   Wraith version:     4.2.4
DEBUG:   Ruby version:       ruby 2.6.5p114 (2019-10-01 revision 67812) [i386-mingw32]
DEBUG:   ImageMagick:        Version: ImageMagick 7.0.9-2 Q16 x64 2019-10-30 http://www.imagemagick.org
DEBUG:   PhantomJS version:  2.1.1
DEBUG:   chromedriver version:  ChromeDriver 79.0.3945.36 (3582db32b33893869b8c1339e8f4d9ed1816f143-refs/branch-heads/3945@{#614})
DEBUG:   CasperJS version:   1.1.4
DEBUG: #################################################
Config validated. No serious issues found.
Creating Folders
SAVING IMAGES
DEBUG: casperjs  'C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/wraith-4.2.4/lib/wraith/javascript/casper.js' 'http://192.168.99.101:4000/#/' '1920x1080' 'shots/Screens/MULTI_casperjs_home.png' 'body' 'D:/Documenten/Scho
ol/Masterproef/Wraith/TestingMC/javascript/wait--casper.js' 'false'
Snapping http://192.168.99.101:4000/#/ at: 1920x1080

  • 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 '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
#
##############################################################
##############################################################

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

# (required) The domain to take screenshots of.
domains:
  home: "http://192.168.99.101:4000/#"

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


# (optional) JavaScript file to execute before taking screenshot of every path. Default: nil
before_capture: 'javascript/wait--casper.js'

# (required) Screen widths (and optional height) to resize the browser to before taking the screenshot.
screen_widths:
  - 1920x1080

# (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: 'shots_base'

# (required) The directory that your latest 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) 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: ''

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