Comments (6)
I am still experiencing this issue. Any idea why?
/Library/Ruby/Gems/2.3.0/gems/wraith-4.2.3/lib/wraith/crop.rb:48:in "initialize": no implicit conversion of nil into String (TypeError)
from wraith.
I think this is actually related to Issue #122 and looks like it was closed a few days ago. Don't believe the gem is updated, though.
from wraith.
I started a PR #123, but there is a better way of doing it. The bug is actually to do with Phantom, if the process dies or anything else goes wrong, it just skips over to the next image. This means the cropping occurs when there are an incorrect amount of images.
The solution is to find a folder where the image(s) are missing, then add a placeholder to prevent the whole process from failing. Simply raising as exception and moving on instead wouldn't work as the images would then be out of order when comparing.
from wraith.
This will be fixed by #112
from wraith.
Completely missed these notifications.
Yeah, I assumed this would be related to Phantom because I started using Slimer and the problem doesn't happen anymore. Need to give a try to the latest version with Phantom.
from wraith.
Using chrome
and having the same problems when running wraith latests history_config.yml
.
$ wraith info
DEBUG: #################################################
DEBUG: Command run: info
DEBUG: Wraith version: 4.2.3
DEBUG: Ruby version: ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
DEBUG: ImageMagick: Version: ImageMagick 7.0.8-12 Q16 x86_64 2018-09-23 https://imagemagick.org
DEBUG: PhantomJS version: 2.1.1
DEBUG: chromedriver version: ChromeDriver 72.0.3626.69 (3c16f8a135abc0d4da2dff33804db79b849a7c38)
DEBUG: CasperJS version: CasperJS not installed
DEBUG: #################################################
and my history_config.yml
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 '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: "phantomjs"
# browser: "slimerjs"
browser: "chrome"
# (required) The domain to take screenshots of.
domains:
acompalia: 'https://domain.com'
# (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: /
esp_home: /es
# (required) Screen widths (and optional height) to resize the browser to before taking the screenshot.
screen_widths:
- 320
- 600
- 768
- 1024
- 1280
# (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_postupdates'
# (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: 400
thumb_height: 400
# (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) Color to highlight the image diff. Default: 'blue'
highlight_color: red
========
Results in…
Config validated. No serious issues found.
Creating Folders
SAVING IMAGES
COPYING BASE IMAGES
Copying shots_base/home to shots_postupdates
Copying shots_base/donate to shots_postupdates
Copying shots_base/volunteers to shots_postupdates
Copying shots_base/members to shots_postupdates
Copying shots_base/news to shots_postupdates
Copying shots_base/grief_support to shots_postupdates
Copying shots_base/esp_home to shots_postupdates
Copying shots_base/esp_donate to shots_postupdates
Copying shots_base/esp_volunteers to shots_postupdates
Copying shots_base/esp_members to shots_postupdates
Copying shots_base/esp_news to shots_postupdates
Copying shots_base/esp_grief_support to shots_postupdates
CROPPING IMAGES
/Library/Ruby/Gems/2.3.0/gems/wraith-4.2.3/lib/wraith/crop.rb:48:in `initialize': no implicit conversion of nil into String (TypeError)
from /Library/Ruby/Gems/2.3.0/gems/wraith-4.2.3/lib/wraith/crop.rb:48:in `open'
from /Library/Ruby/Gems/2.3.0/gems/wraith-4.2.3/lib/wraith/crop.rb:48:in `image_dimensions'
from /Library/Ruby/Gems/2.3.0/gems/wraith-4.2.3/lib/wraith/crop.rb:26:in `crop_if_necessary'
from /Library/Ruby/Gems/2.3.0/gems/wraith-4.2.3/lib/wraith/crop.rb:19:in `block in crop_images'
from /Library/Ruby/Gems/2.3.0/gems/parallel-1.12.1/lib/parallel.rb:486:in `call_with_index'
from /Library/Ruby/Gems/2.3.0/gems/parallel-1.12.1/lib/parallel.rb:455:in `process_incoming_jobs'
from /Library/Ruby/Gems/2.3.0/gems/parallel-1.12.1/lib/parallel.rb:437:in `block in worker'
from /Library/Ruby/Gems/2.3.0/gems/parallel-1.12.1/lib/parallel.rb:428:in `fork'
from /Library/Ruby/Gems/2.3.0/gems/parallel-1.12.1/lib/parallel.rb:428:in `worker'
from /Library/Ruby/Gems/2.3.0/gems/parallel-1.12.1/lib/parallel.rb:419:in `block in create_workers'
from /Library/Ruby/Gems/2.3.0/gems/parallel-1.12.1/lib/parallel.rb:418:in `each'
from /Library/Ruby/Gems/2.3.0/gems/parallel-1.12.1/lib/parallel.rb:418:in `each_with_index'
from /Library/Ruby/Gems/2.3.0/gems/parallel-1.12.1/lib/parallel.rb:418:in `create_workers'
from /Library/Ruby/Gems/2.3.0/gems/parallel-1.12.1/lib/parallel.rb:358:in `work_in_processes'
from /Library/Ruby/Gems/2.3.0/gems/parallel-1.12.1/lib/parallel.rb:264:in `map'
from /Library/Ruby/Gems/2.3.0/gems/parallel-1.12.1/lib/parallel.rb:217:in `each'
from /Library/Ruby/Gems/2.3.0/gems/wraith-4.2.3/lib/wraith/crop.rb:18:in `crop_images'
from /Library/Ruby/Gems/2.3.0/gems/wraith-4.2.3/lib/wraith/cli.rb:87:in `block in crop_images'
from /Library/Ruby/Gems/2.3.0/gems/wraith-4.2.3/lib/wraith/helpers/utilities.rb:4:in `within_acceptable_limits'
from /Library/Ruby/Gems/2.3.0/gems/wraith-4.2.3/lib/wraith/cli.rb:84:in `crop_images'
from /Library/Ruby/Gems/2.3.0/gems/wraith-4.2.3/lib/wraith/cli.rb:161:in `block in latest'
from /Library/Ruby/Gems/2.3.0/gems/wraith-4.2.3/lib/wraith/helpers/utilities.rb:4:in `within_acceptable_limits'
from /Library/Ruby/Gems/2.3.0/gems/wraith-4.2.3/lib/wraith/cli.rb:155:in `latest'
from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
from /Library/Ruby/Gems/2.3.0/gems/wraith-4.2.3/bin/wraith:5:in `<top (required)>'
from /usr/local/bin/wraith:22:in `load'
from /usr/local/bin/wraith:22:in `<main>'
from wraith.
Related Issues (20)
- Trying to use with Chromedriver: Module not defined error HOT 1
- Test various mobile device and browser HOT 1
- Support request: Possibility to change Chromedriver port? HOT 1
- Wraith in docker using old version of Chrome according to screenshots HOT 2
- The docker image is far to big
- How to use custom headers while using chrome driver?
- Publish new version of wraith HOT 5
- BBC Docker account has gone missing, along with wraith image HOT 2
- Wait doesn't work anymore with chrome HOT 4
- No such file or directory @ rb_sysopen - spider.txt (Errno::ENOENT) HOT 1
- Page not loaded completely even with wait of 10 seconds
- Add a url parameter to only one of the two urls
- wraith multi_capture command not working
- Wraith History: Screenshot are completly white
- session not created: This version of ChromeDriver only supports Chrome version 81
- Can you run chrome headless?
- [Question] login or import session
- Documentation not there HOT 3
- WARN: Unable to create a diff image
- [BBC's Wraith]: No implicit conversion of string into integer HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wraith.