Closed zilti closed 4 years ago
Would (Before ...)
hooks or Background:
blocks do the trick?
Not really, no... Maybe I am thinking too low-level? But a step like "And I click on the element with id {string}" can be used across many features, which it seems would mean that I have to define it anew in every feature using it.
Backgrounds also are restricted to one feature each, and a Before
block is executed at the beginning of every scenario of a feature, if I understood that correctly.
Then I'm afraid I can't help you
Thanks nonetheless! And we are actually using kaocha-cucumber for our software now.
We're considering using kaocha-cucumber for browser testing of our project. Since that means there are, no matter which feature, a lot of similar steps, I wonder if there is a way to define "default" steps that will be used when none is defined in the specific namespace. Like e.g.
"If I click on the element with id {string}"
is something we would use in many feature files, and this would otherwise mean to have duplicate code.