Skip to content

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

Closed
wants to merge 20 commits into from

Conversation

karthiktv006
Copy link
Contributor

Fix for #275

@@ -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) {
Copy link
Member

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.

@charlierudolph
Copy link
Member

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.

@lock
Copy link

lock bot commented Oct 25, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants