Closed rayferns closed 8 years ago
Where are you getting RemoveSelectors and HideSelectors from? Is it in the docs?
As far as I know, this isn't a feature!
RemoveSelectors and HideSelectors is not documented in Wraith docs, I googled this and found it from Node JS backstopJS project. Was eagerly looking for solutions.
You can interact with the page in your before_capture files so you can just use js/jquery to remove elements that you dont wan't.
Thanks @SimonKeep.
Yes, the docs are at http://bbc-news.github.io/wraith/#before_capturehooks. Good luck!
I've been trying to hide or remove CSS Selectors using RemoveSelectors or HideSelectors, that overlaps the Selectors I have listed to verify, unfortunately, with no success I've given up trial an error approach. eg: removeSelectors: '#cookie-compliance' or
Any help appreciated.
Details below.
Thanks,
Reporting a problem? Please describe the issue above, and complete the following checklist so that we can help you more quickly.
Issue checklist:
verbose: true
to my config) and pasted the output below:paste config here
debug mode
verbose: true
Headless browser option
browser: casperjs: "casperjs"
phantomjs: "phantomjs"
Type the name of the directory that shots will be stored in
directory: 'Retailers_CSS_Selector_shots'
As per https://github.com/BBC-News/wraith/issues/308 - to read in https urls
phantomjs_options: --ssl-protocol=tlsv1 --ignore-ssl-errors=yes
before_capture: 'javascript/wait--casper.js'
Add only 2 domains, key will act as a label
domains: Live: "http://www.volkswagen.co.uk"
Origin_VW03: "http://origin-vw03.vwcloud.co.uk"
Origin_VW06: "http://origin-vw06.vwcloud.co.uk"
Type screen widths below, here are a couple of examples
screen_widths:
resize_or_reload: 'resize'
resize_or_reload: 'reload'
Type page URL paths below, here are a couple of examples
paths: Retailer: path: /find-a-retailer selector: '.grid-row' removeSelectors: '#cookie-compliance'
hideSelectors: '#cookie-compliance'
This section does not work since CSS with hash does not show up on snapped images, need to investigate further.
HomeHeader: path: / selector: '#header' HomeFooter: path: / selector: '#footer'
before_capture: 'javascript/disable_javascript_and_cookies--casperjs'
before_capture: 'javascript/disable_javascript--casper.js'
Amount of fuzz ImageMagick will use
fuzz: '20%'
Set the number of days to keep the site spider file
spider_days:
Choose how results are displayed, by default alphanumeric. Different screen widths are always grouped.
alphanumeric - all paths (with, and without, a difference) are shown, sorted by path
diffs_first - all paths (with, and 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)
mode: diffs_first
mode: alphanumeric
threshold: 5
Examples: 'basic_template' (default), 'slideshow_template'
gallery: template: 'basic_template' thumb_width: 200 thumb_height: 200