Extending Iridium With Custom Step Definitions
See the original posting on DZone Python
Cucumber, which is the library that Iridium is built on, has been designed to allow developers to easily have their own code run in response to a step inside a feature script. Once you have all the boilerplate code written to initialize Cucumber, having it run your own code is as simple as creating a POJO with methods that have the annotations @Then, @When, @But, @Given or @And.
But getting all the boilerplate code written is not quite as easy as it sounds, especially when you are integrating Cucumber with WebDriver in order to drive a web browser. In fact, the bulk of code in Iridium has been written to provide an environment where WebDriver and Cucumber can work together. Writing the code that is executed by a feature scripts is actually one of the easiest aspects of the Iridium code base.