wraith problems behing login page
rbnfdez opened this issue · comments
I'm testing Wraith framework for testing the look and feel of our site behind a login page. I found some threads talking about wraith is not a tool for testing private page, however I found other that is possible. I injected a js login and I arrived to the page behind the login (Called Notifications) but wraith gets freeze. Any idea? Thanks !!
verbose log
/Users/rbnfdez/.rvm/gems/ruby-2.1.8/gems/wraith-4.0.0/lib/wraith/helpers/utilities.rb:52: warning: Insecure world writable dir /Users/rbnfdez/.rvm/gems in PATH, mode 040777
DEBUG: #################################################
DEBUG: Command run: capture capture
DEBUG: Wraith version: 4.0.0
DEBUG: Ruby version: ruby 2.1.8p440 (2015-12-16 revision 53160) [x86_64-darwin14.0]
DEBUG: ImageMagick: Version: ImageMagick 6.9.2-6 Q16 x86_64 2015-11-15 http://www.imagemagick.org
DEBUG: PhantomJS version: 2.1.1
DEBUG: CasperJS version: 1.1.3
DEBUG: #################################################
Config validated. No serious issues found.
Creating Folders
SAVING IMAGES
DEBUG: phantomjs --ignore-ssl-errors=true '/Users/rbnfdez/.rvm/gems/ruby-2.1.8/gems/wraith-4.0.0/lib/wraith/javascript/phantom.js' 'http://www.redbooth.com/login' '1920x1080' 'shots/login/1920x1080_phantomjs_pro.png' 'body' '/Users/rbnfdez/Desktop/wraith/javascript/login-phantom.js' 'false'
DEBUG: phantomjs --ignore-ssl-errors=true '/Users/rbnfdez/.rvm/gems/ruby-2.1.8/gems/wraith-4.0.0/lib/wraith/javascript/phantom.js' 'http://release.staging.redbooth.com/login' '1920x1080' 'shots/login/1920x1080_phantomjs_staging.png' 'body' '/Users/rbnfdez/Desktop/wraith/javascript/login-phantom.js' 'false'
Loading http://release.staging.redbooth.com/login at dimensions: 1920x1080
Loading http://www.xxx.com/login at dimensions: 1920x1080
Page title is Notifications - xxx
Loading time 6167 msec
Page title is xxx Login | xxx
Loading time 2838 msec
config file
#(required) The engine to run Wraith with. Examples: 'phantomjs', 'casperjs', 'slimerjs'
browser: "phantomjs"
#(required) The domains to take screenshots of.
domains:
pro: "http://www.xxx.com"
staging: "http://xxx.xxx.xxxh.com"
#(required) The paths to capture. All paths should exist for both of the domains specified above.
paths:
login:
path: "/login"
#(required) Screen widths (and optional height) to resize the browser to before taking the screenshot.
screen_widths:
#- 320
#- 600x768
#- 768
#- 1024
#- 1280
- 1920x1080
#(optional) JavaScript file to execute before taking screenshot of every path. Default: nil
#before_capture: 'javascript/disable_javascript--phantom.js'
before_capture: "javascript/login-phantom.js"
#(required) The directory that your 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
verbose: true
phantomjs_options: --ignore-ssl-errors=true
Please see issue #469, which links to a detailed answer on testing pages behind login.