Closed ezwanharun closed 6 years ago
scenarioResult
and isFailed
are old APIs. Please see here for the v4 docs about attachments in hooks for failed scenarios.
AfterStep is not something built into cucumber. Are you using another program to execute cucumber?
yeah. i tried to used testCase.result.status === Status.FAILED
method. It doesnt execute that specific method at all. Think that this is due to other dependencies that I used wdio-cucumber-frameowrk
l just raised in wdio-cucumber-framework repo.Think can close this ticket as it been raised in wrong repo. https://github.com/webdriverio/wdio-cucumber-framework/issues/108
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.
cucumber version :4.0.0 `
afterScenario: function afterScenario(scenarioResult) { if (scenarioResult.status != "passed") { browser.saveScreenshot("./allure-results/"); } }
`
also tried with
`
`
I noticed that that if condition can't been executed at all. I tried with afterStep() method, it work as expected. However, i don't want to screenshot in steps level.