Hi Eliyas,
In the substep definitions, you define the expected conditions that you are looking for in the web page, eg, you look for a div with a known id that contains some text - the name of the logged in user perhaps. The webdriver-substeps library uses webdriver to try and locate the element and will fail if it is unable to do so. There's a range of find mechanisms available which you can extend or replace with your own.
If you take a look at the example substeps project (it can be downloaded from
here) you will see examples of the various mechanisms.
I hope that answers your question, please post back if not.
Kind regards
Ian