-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix readme on using scenario.attach #517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
run as --dry-run
Conflicts: lib/cucumber/runtime.js
fix the failing spec after enabling dry run option
Mark scenario as skipped in dryrun mode similar to cucumber ruby standards
Conflicts: lib/cucumber/listener/summary_formatter.js
@@ -400,8 +399,9 @@ when a scenario fails: | |||
``` javascript | |||
this.After(function (scenario, callback) { | |||
if (scenario.isFailed()) { | |||
webDriver.takeScreenshot().then(stream) { | |||
scenario.attach(stream, 'image/png', callback); | |||
driver.takeScreenshot().then(function (stream) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the latest version of selenium webdriver, takeSceenshot returns a string that is a base-64 encoded PNG
. Thus stream should be renamed to str
. I think it will be simpler if the json formatter stops encoding with base64 and leaves it up to the user to encode it.
Closing as with 5fb6706 there is no intermediate conversion to string and we just encode it as base64 when adding it to the json output. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fix for #275