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

Spidering with a list of URLs - better documentation?

juddrgledhill opened this issue · comments

I am working through the documentation to spider a single website, from Windows, and do compares before and after a code delivery (visual regression testing). I am all installed and ready to go. I am unable to get spidering to work - the documentation on the site is pretty sparse and it did not work out of the box. I have fallen back to a list of URLs in a text file and cannot get the list to parse in wraith - I am not sure what format it should be in.

So I am incrementally moving through errors. Right now I am using this command, hoping to get a baseline of screen shots to do a latest against.

wraith history configs/dev.yaml


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

Issue checklist:

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

Valid YAML
Total Character | Total Word | Total Lines | Size
2414 | 322 | 72 | 2.5 KB

  • I have run the wraith info command and pasted the output below:
    python? is that required?
C:\wraith>wraith info
'python' is not recognized as an internal or external command,
operable program or batch file.
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/helpers/utilities.rb:56:in `run_command_safely': undefined method `chomp' for nil:NilClass (NoMethodError)
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/helpers/utilities.rb:36:in `list_debug_information'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/cli.rb:169:in `info'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/bin/wraith:5:in `<top (required)>'
        from C:/Ruby24-x64/bin/wraith:22:in `load'
        from C:/Ruby24-x64/bin/wraith:22:in `<main>'

  • I have run the command in verbose mode (by adding verbose: true to my config) and pasted the output below:
C:\wraith>wraith history configs/dev.yaml
'python' is not recognized as an internal or external command,
operable program or batch file.
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/helpers/utilities.rb:56:in `run_command_safely': undefined method `chomp' for nil:NilClass (NoMethodError)
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/helpers/utilities.rb:36:in `list_debug_information'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/validate.rb:14:in `validate'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/cli.rb:145:in `block in history'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/helpers/utilities.rb:4:in `within_acceptable_limits'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/cli.rb:144:in `history'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/bin/wraith:5:in `<top (required)>'
        from C:/Ruby24-x64/bin/wraith:22:in `load'
        from C:/Ruby24-x64/bin/wraith:22:in `<main>'
  • I have pasted the contents of my config file below:
# (required) The engine to run Wraith with. Examples: 'phantomjs', 'casperjs', 'slimerjs'
verbose: true
browser: "phantomjs"
phantomjs_options: '--ignore-ssl-errors=true --ssl-protocol=tlsv1'

# (required) The domain to take screenshots of.
domains:
  english: "https://www-dev.conning.com"

spider_file: conning_spider_paths.txt

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

# (required) Screen widths (and optional height) to resize the browser to before taking the screenshot.

screen_widths:
- 1024
#- 1440 x 2560  # Android Galaxy S7
#- 1280 x 800   # Android Tablet
#- 1080 x 1920  # iPhone 6S Plus
#- 1536 x 2048  # iPad Air 2


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

Here is my conning_spider_paths.txt. Note that I added the quotes hoping to get to the next error.

"https://www.conning.com/"
"https://www.conning.com/corporate-responsibility"
"https://www.conning.com/consultants/information-center"
"https://www.conning.com/products/risk-management/firm-portfolio-analyzer"
"https://www.conning.com/insurers/risk-advisory-services"
"https://www.conning.com/about-us/insights/insights---comparing-performance-metrics-when-optimizing-investment-strategies"
"https://www.conning.com/products/risk-management"
"https://www.conning.com/products/investment-management/equities/high-dividend-equity"
"https://www.conning.com/products"
"https://www.conning.com/products/investment-management/liability-driven-investing"
"https://www.conning.com/about-us/insights"
"https://www.conning.com/business-continuity-plan"
"https://www.conning.com/products/risk-management/advise-enterprise-risk-modeler"
"https://www.conning.com/about-us/news"
"https://www.conning.com/products/investment-management/specialty-asset-classes"
"https://www.conning.com/products/risk-management/investment-optimizer"
"https://www.conning.com/products/investment-management"
"https://www.conning.com/about-us/insights/insights---strategic-asset-allocation"
"https://www.conning.com/products/investment-management/objective-driven-investing"
"https://www.conning.com/products/insurance-research/publications-and-subscriptions"
"https://www.conning.com/products/investment-management/fixed-income"
"https://www.conning.com/about-us/insights/key-facts---june-2017"
"https://www.conning.com/about-us/insights/acli-webinar-february"
"https://www.conning.com/about-us/insights/insights---risk-attribution"
"https://www.conning.com/about-us/news/conning-sees-continued-interest-in-mid-stream-mlps"
"https://www.conning.com/about-us/insights/viewpoint---libor"
"https://www.conning.com/consultants/investment-management"
"https://www.conning.com/about-us/news/connings-gems-software-releases-best-economic-scenario-generator-award-from-risk,-d-,net-for-fourth-time-in-six-years"
"https://www.conning.com/about-us/news/demographic-trends-shape-life-of-settlement-market"
"https://www.conning.com/about-us/insights/viewpoint---acha-may-offer-relief-to-health-insurers"
"https://www.conning.com/about-us/news/ldi-tool-for-pension-plan-sponsors-and-their-advisers"
"https://www.conning.com/products/investment-management/equities"
"https://www.conning.com/about-us/news/conning-launches-ldi-pooled-fund-suite"
"https://www.conning.com/about-us/insights/q2-2017-state-of-the-states"
"https://www.conning.com/pension-plans/equities"
"https://www.conning.com/insurers"
"https://www.conning.com/about-us/insights/viewpoint---risk-factors"
"https://www.conning.com/products/insurance-research/consulting-and-proprietary-research"
"https://www.conning.com/products/investment-management/fixed-income/municipals"
"https://www.conning.com/products/insurance-research/new-studies/press-release-article/Capital%20Buildup%20in%20the%20Life%20Industry%20%20Under%20Pressure%20with%20Limited%20Deployment%20Opportunities/15820"
"https://www.conning.com/products/insurance-research/new-studies/press-release-article/Global%20Insurer%20Mergers%20and%20Acquisitions%20%20Activity%20Slows%20but%20Pressures%20Remain/15810"
"https://www.conning.com/products/insurance-research/new-studies/press-release-article/Emerging%20Business%20Models%20in%20Personal%20Lines%20Insurance%20%20InnovationBased%20Disruption/15833"
"https://www.conning.com/products/insurance-research/glossary"
"https://www.conning.com/products/insurance-research/publications-and-subscriptions/article/2017%20-%20Global%20Insurer%20Mergers%20and%20Acquisitions%20in%202016%20-%20Activity%20Slows,%20but%20Pressures%20Remain/TDUM0517"
"https://www.conning.com/products/insurance-research/new-studies/press-release-article/PropertyCasualty%20Managing%20General%20Agents%20%20Growth%20Continues%20but%20No%20Escape%20from%20the%20Soft%20Market/16007"
"https://www.conning.com/about-us/news/key-facts---q12017"
"https://www.conning.com/products/insurance-research/publications-and-subscriptions/article/2017%20-%20Property-Casualty%20Managing%20General%20Agents%20-%20Growth%20Continues,%20but%20No%20Escape%20from%20the%20Soft%20Market/PDUM0617"
"https://www.conning.com/about-us/insights/viewpoint---post-election-pension-de-risking-strategy-considerations"
"https://www.conning.com/about-us/news/conditions-for-insurance-distribution-and-services"
"https://www.conning.com/terms-of-use"
"https://www.conning.com/products/risk-management/gems-economic-scenario-generator"
"https://www.conning.com/products/insurance-research"
"https://www.conning.com/about-us/news/ir---life-industry-capital-buildup-facing-new-pressures"
"https://www.conning.com/pension-plans/fixed-income"
"https://www.conning.com/pension-plans/liability-driven-investing"
"https://www.conning.com/privacy-and-social-media-policy"
"https://www.conning.com/pension-plans/liability-driven-investing#!"
"https://www.conning.com/about-us/news/soa-and-conning-provide-a-practical-guide-to-esg"
"https://www.conning.com/about-us/insights/insights---pension-funded-status-tracker---q2-2017"
"https://www.conning.com/about-us/leadership"
"https://www.conning.com/about-us/careers"
"https://www.conning.com/products/insurance-research/New-Studies"
"https://www.conning.com/about-us/careers/benefits"
"https://www.conning.com/about-us/careers/internships"
"https://www.conning.com/products/insurance-research/consulting-and-proprietary-research/strategy-and-business-development"
"https://www.conning.com/pension-plans"
"https://www.conning.com/products/insurance-research/new-studies/press-release-article/2016%20PropertyCasualty%20Loss%20Reserves%20%20Reserve%20RedundanciesWhat%20Goes%20Up%20Must%20Come%20Down/16221"
"https://www.conning.com/about-us/insights/insights---assettv-owais-interview"
"https://www.conning.com/about-us/insights/viewpoint---trumping-the-credit-cycle"
"https://www.conning.com/products/insurance-research/publications-and-subscriptions/article/2017%20-%20Capital%20Buildup%20in%20the%20Life%20Industry%20-%20Under%20Pressure%20with%20Limited%20Deployment%20Opportunities/LDUM0517"
"https://www.conning.com/products/investment-management/equities/master-limited-partnerships"
"https://www.conning.com/about-us/news/conning-joins-un-initiative-promoting-principles-for-responsible-investment"
"https://www.conning.com/about-us/news/rich-sega-featured-in-insurance-asset-risk"
"https://www.conning.com/about-us/insights/viewpoint---central-banks"
"https://www.conning.com/products/insurance-research/new-studies"
"https://www.conning.com/about-us/news/ir---personal-lines-insurance"
"https://www.conning.com/products/investment-management/investment-accounting-and-reporting"
"https://www.conning.com/insurers/investment-management"
"https://www.conning.com/products/insurance-research/new-studies/press-release-article/LifeAnnuity%20Distribution%20and%20Marketing%20Annual%20%20Digital%20Distribution%20Takes%20Off/16188"
"https://www.conning.com/products/insurance-research/publications-and-subscriptions/article/2017%20-%20The%20Life-Annuity%20Distribution%20and%20Marketing%20Annual%20-%20Digital%20Distribution%20Takes%20Off/LDUM0717"
"https://www.conning.com/about-us/insights/insights---the-future-of-forecasting"
"https://www.conning.com/about-us"
"https://www.conning.com/about-us/insights/insights---a,-d-,m,-d-,-best-interview-dan-mainolfi"
"https://www.conning.com/about-us/news/state-of-the-states---may-2017"
"https://www.conning.com/products/insurance-research/new-studies/press-release-article/Commercial%20Automobile%20Insurance%20%20Fix%20Me%20Please/15472"
"https://www.conning.com/products/insurance-research/publications-and-subscriptions/article/2017%20-%20Commercial%20Automobile%20Insurance%20-%20Fix%20Me%20Please/PDUM0217"
"https://www.conning.com/products/insurance-research/new-studies/press-release-article/Buyer%20Trends%20in%20PropertyCasualty%20Reinsurance%20%20A%20Look%20at%20US%20Cedants%20and%20Their%20Reinsurers/15619"
"https://www.conning.com/products/insurance-research/publications-and-subscriptions/article/2017%20-%20Buyer%20Trends%20in%20Property-Casualty%20Reinsurance%20-%20A%20Look%20at%20US%20Cedants%20and%20Their%20Reinsurers/PDUM0317"
"https://www.conning.com/products/insurance-research/publications-and-subscriptions/article/2017/TDUM0317"
"https://www.conning.com/Cart"
"https://www.conning.com/products/insurance-research/publications-and-subscriptions/article/2017%20-%20Emerging%20Business%20Models%20in%20Personal%20Lines%20Insurance%20-%20Innovation-Based%20Disruption/PDUM0417"
"https://www.conning.com/products/insurance-research/new-studies/press-release-article/Global%20Insurance%20Distribution%20and%20Services%20Sector%20Mergers%20and%20Acquisition%20%20The%20Beat%20Goes%20On/15629"
"https://www.conning.com/products/insurance-research/publications-and-subscriptions/article/2017%20-%20Global%20Insurance%20Distribution%20and%20Services%20Sector%20Mergers%20and%20Acquisitions%20-%20The%20Beat%20Goes%20On/TDUM0317"
"https://www.conning.com/about-us/contact-us"
"https://www.conning.com/modern-slavery-statement-uk"
"https://www.conning.com/about-us/news/digital-distribution-of-life-insurance-takes-off"
"https://www.conning.com/products/insurance-research/consulting-and-proprietary-research/other-consulting-services"
"https://www.conning.com/products/insurance-research/publications"
"https://www.conning.com/consultants"
"https://www.conning.com/about-us/careers/life-at-conning"
"https://www.conning.com/about-us/insights/viewpoint---liability-driven-investing--for-insurance-companies"
"https://www.conning.com/about-us/insights/insights---breaking-the-pension-funding-stalemate"
"https://www.conning.com/products/insurance-research/publications-and-subscriptions/article/2017%20-%202016%20Property%20Casualty%20Loss%20Reserves%20-%20Reserve%20Redundancies%20-%20What%20Goes%20Up%20Must%20Come%20Down/PDUM0717"
"https://www.conning.com/products/insurance-research/"
"https://www.conning.com/products/insurance-research/conning-library"
"https://www.conning.com/products/insurance-research/consulting-and-proprietary-research/transactional-support"