john-doherty / selenium-cucumber-js

Browser automation framework written in pure JavaScript using official selenium-webdriver and cucumber-js
ISC License
120 stars 89 forks source link

AfterScenario detect if scenario failed or no #60

Closed vhugogarcia closed 1 year ago

vhugogarcia commented 6 years ago

Hello friends,

anybody knows how to detect on the hook AfterScenario if it failed or no?

I tried already with: IsFailed if (!scenario.isFailed) { driver.call(setScore, null, 'pass').then(function(result){ console.log('set score to pass'); }); } done();

I had no cluck with that.

Any idea is always welcome.

tjl694 commented 5 years ago

I believe it should be scenario.isFailed()