mattheworiordan / capybara-screenshot

Automatically save screen shots when a Capybara scenario fails
MIT License
1.02k stars 168 forks source link

html_link_reporter.rb:25:in `link_to_screenshot': undefined method `escape' for URI:Module (NoMethodError) #283

Open TimB0 opened 3 years ago

TimB0 commented 3 years ago

i get this error when i try to run capybara-screenshot with rspec --format html --out rspec_results.html

/Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/capybara-screenshot-1.0.25/lib/capybara-screenshot/rspec/html_link_reporter.rb:25:in link_to_screenshot': undefined methodescape' for URI:Module (NoMethodError) from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/capybara-screenshot-1.0.25/lib/capybara-screenshot/rspec/html_link_reporter.rb:17:in extra_failure_content_with_screenshot' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters/html_formatter.rb:80:inexample_failed' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/reporter.rb:209:in block in notify' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/reporter.rb:208:ineach' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/reporter.rb:208:in notify' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/reporter.rb:145:inexample_failed' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:481:in finish' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:440:infail_with_exception' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:613:in block in run' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:654:ineach' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:654:in for_filtered_examples' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:613:inrescue in run' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:609:in run' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:121:inblock (3 levels) in run_specs' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:121:in map' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:121:inblock (2 levels) in run_specs' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:2067:in with_suite_hooks' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:116:inblock in run_specs' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/reporter.rb:74:in report' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:115:inrun_specs' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:89:in run' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:71:inrun' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:45:in invoke' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/exe/rspec:4:in<top (required)>' from /Users/discocide666/.rbenv/versions/3.0.0/bin/rspec:23:in load' from /Users/discocide666/.rbenv/versions/3.0.0/bin/rspec:23:in<top (required)>' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/exec.rb:63:in load' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/exec.rb:63:inkernel_load' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/exec.rb:28:in run' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:494:inexec' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:ininvoke_command' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:30:indispatch' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:24:instart' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/exe/bundle:49:in block in <top (required)>' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/friendly_errors.rb:130:inwith_friendly_errors' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/exe/bundle:37:in <top (required)>' from /Users/discocide666/.rbenv/versions/3.0.0/bin/bundle:23:inload' from /Users/discocide666/.rbenv/versions/3.0.0/bin/bundle:23:in <main>' /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/capybara-screenshot-1.0.25/lib/capybara-screenshot/rspec/html_link_reporter.rb:25:inlink_to_screenshot': undefined method escape' for URI:Module (NoMethodError) from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/capybara-screenshot-1.0.25/lib/capybara-screenshot/rspec/html_link_reporter.rb:17:inextra_failure_content_with_screenshot' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters/html_formatter.rb:80:in example_failed' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/reporter.rb:209:inblock in notify' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/reporter.rb:208:in each' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/reporter.rb:208:innotify' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/reporter.rb:145:in example_failed' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:481:infinish' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:291:in run' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:644:inblock in run_examples' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:640:in map' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:640:inrun_examples' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:606:in run' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:121:inblock (3 levels) in run_specs' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:121:in map' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:121:inblock (2 levels) in run_specs' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:2067:in with_suite_hooks' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:116:inblock in run_specs' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/reporter.rb:74:in report' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:115:inrun_specs' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:89:in run' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:71:inrun' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:45:in invoke' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rspec-core-3.10.1/exe/rspec:4:in<top (required)>' from /Users/discocide666/.rbenv/versions/3.0.0/bin/rspec:23:in load' from /Users/discocide666/.rbenv/versions/3.0.0/bin/rspec:23:in<top (required)>' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/exec.rb:63:in load' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/exec.rb:63:inkernel_load' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli/exec.rb:28:in run' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:494:inexec' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:ininvoke_command' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:30:indispatch' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/cli.rb:24:instart' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/exe/bundle:49:in block in <top (required)>' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/lib/bundler/friendly_errors.rb:130:inwith_friendly_errors' from /Users/discocide666/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.16/exe/bundle:37:in <top (required)>' from /Users/discocide666/.rbenv/versions/3.0.0/bin/bundle:23:inload' from /Users/discocide666/.rbenv/versions/3.0.0/bin/bundle:23:in `

'