Steps functionality injection into Unicorn based tests.
- [StepsClass] Attribute for injecting steps handlers into classes with steps methods
- Static
Stepmethod allowing dynamic actions calls with description.
using Unicorn.Taf.StepsInjection;
// Implementation of some class with test steps
[StepsClass]
public class ApplicationSteps
{
// Step with description and parameters
[Step("Open Test website in {0} browser")]
public TestWebsite Open(BrowserType browser)
{
// Related code
}
// Step without parameters
[Step("Switch app")]
public void SwitchApp() =>
//some code
}Call static step entry
using static Unicorn.Taf.StepsInjection.Steps;
// Execute step as Action without sepearate step method
Step("Execute step as an action", () => /* Some code to call */);