capybara-screenshot icon indicating copy to clipboard operation
capybara-screenshot copied to clipboard

Screenshot in JSON Formatter

Open anandchavan opened this issue 7 years ago • 2 comments

Hello there,

I am using "https://github.com/jenkinsci/cucumber-reports-plugin" for generating reports, which generates the reports based on the json output of cucumber execution.

However, the screenshots captured by this plugin aren't exported/embedded in json report.

Can you please take a look at this?

Regards, Anand

anandchavan avatar Aug 02 '17 19:08 anandchavan

Sorry @anandchavan but you will need to look into this if you need this functionality. This is effectively a feature request.

mattheworiordan avatar Nov 02 '17 20:11 mattheworiordan

Some sort of making json output useable with screenshot output info from this gem is

def self.output_error_parser output
    arr = output.lines
    if arr.count > 1
      arr.map! {|line| line.gsub(/.*screenshot: /, '') }
      arr[0] = arr[0].gsub(/html.*$/, 'html').chomp
      arr[1] = arr[1].gsub(/png.*$/, 'png').chomp
      return arr
    else
      return output
    end
  end

@anandchavan

irmpow avatar Jul 12 '18 08:07 irmpow