Skip to content
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

how to use attach inside of a step #62

Open
stevenraines opened this issue May 11, 2018 · 0 comments
Open

how to use attach inside of a step #62

stevenraines opened this issue May 11, 2018 · 0 comments

Comments

@stevenraines
Copy link

Looking to use the "attach" to include a screenshot of a particular step. This is outlined in cucumber-js as seen by this code:

Given(/^a basic step$/, function() {
  this.attach('Some info.')
  this.attach('{"some", "JSON"}}', 'application/json')
})

from:
https://github.com/cucumber/cucumber-js/blob/master/docs/support_files/attachments.md

error is:
this.attach is not a function

At first I thought it was because I was using an arrow function (per the cucumber notes this doesn't work because of rebinding), but I switched to a regular function and still no luck.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant