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

Image not captured when path contains '&' symbol

kittyPillai opened this issue · comments

Hi,

I am testing a site where data is being passed as post request and the URL contains '&' symbols. When I try to execute, it does not capture image and the URL passed is not the complete URL mentioned in the path.

Can someone please let me know how to resolve this.


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

Issue checklist:

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

  • [ Yes] I have run the wraith info command and pasted the output below:

paste results here
  • [ yes] I have run the command in verbose mode (by adding verbose: true to my config) and pasted the output below:
C:\Users\kirti.vm\Documents\Wraith\hybd>wraith capture Search_Cruise.yaml
DEBUG: #################################################
DEBUG:   Command run:        capture Search_Cruise.yaml
DEBUG:   Wraith version:     4.0.1
DEBUG:   Ruby version:       ruby 2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32]
DEBUG:   ImageMagick:        Version: ImageMagick 6.9.9-3 Q8 x64 2017-07-24 http://www.imagemagick.org
DEBUG:   PhantomJS version:  1.9.8
DEBUG:   CasperJS version:   CasperJS not installed
DEBUG: #################################################
Config validated. No serious issues found.
Creating Folders
SAVING IMAGES
DEBUG: phantomjs  'C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://st8.thomsonprjuat.co.uk/cruise/packages?from%5B%5D=LGW%3AAirport%7CLTN%3AAirport%7CSTN%3AAir
port%7CABZ%3AAirport%7CBFS%3AAirport%7CBHX%3AAirport#38;to%5B%5D=CUB%3ACOUNTRY&when=01-11-2017&until=&flexibility=true&flexibleDays=1&noOfAdults=2&noOfSeniors=0&noOfChildren=1&childrenAge=8&duration=1-7&ad
dAStay=0&page=1&searchRequestType=ins&sp=true' '320,600x768,768,1024,1280' 'Search_Cruise_SIT_Shots/home/MULTI_phantomjs_ST8.png' 'body' 'C:/Users/kirti.vm/Documents/Wraith/hybd/javascript/wait--phantom.js
' 'false'
DEBUG: phantomjs  'C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://st5.thomsonprjuat.co.uk/cruise/packages?from%5B%5D=LGW%3AAirport%7CLTN%3AAirport%7CSTN%3AAir
port%7CABZ%3AAirport%7CBFS%3AAirport%7CBHX%3AAirport#38;to%5B%5D=CUB%3ACOUNTRY&when=01-11-2017&until=&flexibility=true&flexibleDays=1&noOfAdults=2&noOfSeniors=0&noOfChildren=1&childrenAge=8&duration=1-7&ad
dAStay=0&page=1&searchRequestType=ins&sp=true' '320,600x768,768,1024,1280' 'Search_Cruise_SIT_Shots/home/MULTI_phantomjs_ST3.png' 'body' 'C:/Users/kirti.vm/Documents/Wraith/hybd/javascript/wait--phantom.js
' 'false'
Loading http://st5.thomsonprjuat.co.uk/cruise/packages?from%5B%5D=LGW%3AAirport%7CLTN%3AAirport%7CSTN%3AAirport%7CABZ%3AAirport%7CBFS%3AAirport%7CBHX%3AAirport#38;to%5B%5D=CUB%3ACOUNTRY at dimensions: NaNx
1500

Loading http://st8.thomsonprjuat.co.uk/cruise/packages?from%5B%5D=LGW%3AAirport%7CLTN%3AAirport%7CSTN%3AAirport%7CABZ%3AAirport%7CBFS%3AAirport%7CBHX%3AAirport#38;to%5B%5D=CUB%3ACOUNTRY at dimensions: NaNx
1500

Snapping http://st5.thomsonprjuat.co.uk/cruise/packages?from%5B%5D=LGW%3AAirport%7CLTN%3AAirport%7CSTN%3AAirport%7CABZ%3AAirport%7CBFS%3AAirport%7CBHX%3AAirport#38;to%5B%5D=CUB%3ACOUNTRY at: NaNx1500

'when' is not recognized as an internal or external command,
operable program or batch file.
'until' is not recognized as an internal or external command,
operable program or batch file.
'flexibility' is not recognized as an internal or external command,
operable program or batch file.
'flexibleDays' is not recognized as an internal or external command,
operable program or batch file.
'noOfAdults' is not recognized as an internal or external command,
operable program or batch file.
'noOfSeniors' is not recognized as an internal or external command,
operable program or batch file.
'noOfChildren' is not recognized as an internal or external command,
operable program or batch file.
'childrenAge' is not recognized as an internal or external command,
operable program or batch file.
'duration' is not recognized as an internal or external command,
operable program or batch file.
'addAStay' is not recognized as an internal or external command,
operable program or batch file.
'page' is not recognized as an internal or external command,
operable program or batch file.
'searchRequestType' is not recognized as an internal or external command,
operable program or batch file.
'sp' is not recognized as an internal or external command,
operable program or batch file.
Snapping http://st8.thomsonprjuat.co.uk/cruise/packages?from%5B%5D=LGW%3AAirport%7CLTN%3AAirport%7CSTN%3AAirport%7CABZ%3AAirport%7CBFS%3AAirport%7CBHX%3AAirport#38;to%5B%5D=CUB%3ACOUNTRY at: NaNx1500

'when' is not recognized as an internal or external command,
operable program or batch file.
'until' is not recognized as an internal or external command,
operable program or batch file.
'flexibility' is not recognized as an internal or external command,
operable program or batch file.
'flexibleDays' is not recognized as an internal or external command,
operable program or batch file.
'noOfAdults' is not recognized as an internal or external command,
operable program or batch file.
'noOfSeniors' is not recognized as an internal or external command,
operable program or batch file.
'noOfChildren' is not recognized as an internal or external command,
operable program or batch file.
'childrenAge' is not recognized as an internal or external command,
operable program or batch file.
'duration' is not recognized as an internal or external command,
operable program or batch file.
'addAStay' is not recognized as an internal or external command,
operable program or batch file.
'page' is not recognized as an internal or external command,
operable program or batch file.
'searchRequestType' is not recognized as an internal or external command,
operable program or batch file.
'sp' is not recognized as an internal or external command,
operable program or batch file.
CROPPING IMAGES
Process.fork is not supported by this Ruby
COMPARING IMAGES
Process.fork is not supported by this Ruby
GENERATING THUMBNAILS
Process.fork is not supported by this Ruby
GENERATING GALLERY
Gallery generated

View the gallery in your browser:
         file://C:/Users/kirti.vm/Documents/Wraith/hybd/Search_Cruise_SIT_Shots/gallery.html

C:\Users\kirti.vm\Documents\Wraith\hybd>
  • [Yes ] I have pasted the contents of my config file below:
##########
### NB: the paths in this YAML config are relative to the root of the Wraith directory,
### as `bundle exec rspec` is run from the root.
##########

#Headless browser option
browser:
  phantomjs: "phantomjs"

# we've deliberately left out the snap_file

resize_or_reload: resize

# Type the name of the directory that shots will be stored in
directory: 'shots'

# Add only 2 domains, key will act as a label
domains:
  ST8: "http://st8.thomsonprjuat.co.uk"
  ST3: "http://st5.thomsonprjuat.co.uk"

#Type screen widths below, here are a couple of examples
screen_widths:
  - 320
  - 600x768
  - 768
  - 1024
  - 1280


#Type page URL paths below, here are a couple of examples
paths:
  home: /cruise/packages?from%5B%5D=LGW%3AAirport%7CLTN%3AAirport%7CSTN%3AAirport%7CABZ%3AAirport%7CBFS%3AAirport%7CBHX%3AAirport&to%5B%5D=CUB%3ACOUNTRY&when=01-11-2017&until=&flexibility=true&flexibleDays=1&noOfAdults=2&noOfSeniors=0&noOfChildren=1&childrenAge=8&duration=1-7&addAStay=0&page=1&searchRequestType=ins&sp=true


# (optional) JavaScript file to execute before taking screenshot of every path. Default: nil
before_capture: 'javascript/wait--phantom.js'
  
# (required) The directory that your screenshots will be stored in
directory: 'Cruise_SIT_Shots'
  
#Amount of fuzz ImageMagick will use
fuzz: '20%'

verbose: true