Open SamiAkkaya opened 2 years ago
Having the same problem, struggling with this lack of this functionality. Done a lot of search and couldn't find a proper way to do this.
Thanks! I am too looking for the above functionality. @DavertMik @PeterNgTr Is there a way to use tagged hooks as given in the below URL?
https://cucumber.io/docs/cucumber/api/?lang=java#tag-expressions.
Something like as shown below
import {After, Before} from '@cucumber/cucumber'
Before({tags: "@foo"}, ()=>{
// This hook will be executed before scenarios tagged with @foo
});
@PeterNgTr @DavertMik - Hello, is there any chance of having this feature or do you have any suggestions?
Before({tags: '@browser and not @headless'}, async function () {
})
This issue is stale because it has been open for 90 days with no activity.
I want to be able to add value and order parameters to before/after hooks. And values in before/after hooks should be triggered from tags in bdd scenarios.
To execute a specific set of steps before a scenario, I created the method below.
This can be done natively in cucumber:
Scenario example: