#hooks.rb After
@browser.screenshot.save("reports/screenshots/FAILED_#{scenario.__id__}.png")
embed("screenshots/FAILED_#{scenario.__id__}.png",'image/png','Scenario_Failed_Screenshot')Anyone has an idea? Thanks!
--
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Thanks Matt,I follow your suggestion, use this code#cucumber.yml--format html --out reports/cucumber.html#hooks.rb After
@browser.screenshot.save("reports/screenshots/FAILED_#{scenario.__id__}.png")
embed(File.expand_path("reports/screenshots/FAILED_#{scenario.__id__}.png"),'image/png','Scenario_Failed_Screenshot')It works well, cucumber don't complain, and the screenshot displays correctly in the html report.But it still has one problem, when I copy the reports directory to another place, or transfer it to my co-worker, the screenshot can't display correctly in the html report, because the HTML a element uses the absolute path of the screenshot.So how can I fix this problem, and I still don't know why the cucumber embed file need check the screenshot path existence.Thanks.