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

Using phantomjs screenshot results don't show full page

isgerjanson opened this issue · comments

I tried to use phantomjs to grab some screenshots of our website before a design relaunch. Unfortunately, the screenshots are cropped as if the viewport isn't detected right. I have to use casperjs and the empty selector attribute to get it right. Now, it takes some time to set the spider file up, therefore I'd like to know if I missed out on something.

Issue checklist:

Output wraith info:

DEBUG: #################################################
DEBUG:   Command run:        info
DEBUG:   Wraith version:     4.0.1
DEBUG:   Ruby version:       ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
DEBUG:   ImageMagick:        Version: ImageMagick 7.0.6-4 Q16 x86_64 2017-07-29 http://www.imagemagick.org
DEBUG:   PhantomJS version:  2.1.1
DEBUG:   CasperJS version:   1.1.4
DEBUG: #################################################

Output in verbose mode:

Config validated. No serious issues found.
Creating Folders
SAVING IMAGES
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'https://www-de.scoyo.com//' '320,600x768,768,1024,1280' 'shots/home/MULTI_phantomjs_deutsch.png' 'body' '/Users/ijanson/Google Drive/scoyo/Qualitätsmanagement/Automated-Testing/wraith-2/javascript/wait--phantom.js' 'false'
Loading https://www-de.scoyo.com// at dimensions: 320x1500

Snapping https://www-de.scoyo.com// at: 320x1500

Resizing https://www-de.scoyo.com// to: 600x768

Snapping https://www-de.scoyo.com// at: 600x768

Resizing https://www-de.scoyo.com// to: 768x1500

Snapping https://www-de.scoyo.com// at: 768x1500

Resizing https://www-de.scoyo.com// to: 1024x1500

Snapping https://www-de.scoyo.com// at: 1024x1500

Resizing https://www-de.scoyo.com// to: 1280x1500

Snapping https://www-de.scoyo.com// at: 1280x1500

The contents of my config file:

---
imports: "spider_paths.yaml"

browser: "phantomjs"

domains:
  deutsch: "https://www-de.scoyo.com/"

before_capture: "javascript/wait--phantom.js"

screen_widths:
  - 320
  - 600x768
  - 768
  - 1024
  - 1280

resize_or_reload: "resize"

history_dir: "shots_base"

directory: "shots"

fuzz: "20%"

threshold: 5

gallery:
  template: "slideshow_template"
  thumb_width: 200
  thumb_height: 200

mode: diffs_first

verbose: true

highlight_color: red

phantomjs_options: ""

This sounds like a dupe of #318