-
Notifications
You must be signed in to change notification settings - Fork 0
Step library
BDD methodology don't concede you from using any steps description you want. But if you reuse steps you got valuable working time economy on unique step implementation. Step library contains most common test step and oriented on some simplified test workflow. So scenario should have following structure:
Scenario: Most common scenario Go to some page Find some element with text1 Do something with found element Check if some attribute is some value ...
-
Go to <url>
To navigate to given url. Usually it used as configuration step in the beginning of scenario. -
Find <element> with <text>
To find element containing text -
Click found item
Make click on on element found on previous step. -
Check if <attribute> is <value>
Stop if <attribute> is <value>
To check some attributes of elements found on previous steps on equality/non-equality to given value. If sentence is started with Check then it just save state to log. Stop will break scenario execution and switch to next scenario. Instead of is can be is not, are, are not -
Switch to found item
To reach elements inside other complex elements. -
Switch to frame <n>
To change focus to the frame for access elements inside frames and iframes. -
Wait <n> seconds
To wait n second before next step.
-
Run feature <feature>
To execute another feature file. It is used to make test suites and combine several test to complex scenario. -
Load library <library>
To load aliases and test description from given library. By default, only library with feature name is loaded and standart library. If you want to have some common library you can load it with given step.
This group of step is used to fill forms.
-
Fill form
|field_name1|value1|
...
|field_nameN|valueN|
To fast filling form without animation. -
Enter <text>
To enter text to text inputs found on previous steps. -
Set select options
|option1|
...
|optionN|
To set option in select control -
Set radio to <option>
To set option in radio control
This group of step is intended for creating guides.
-
Say <text>
To show text close to fake mouse pointer. -
Highlight and say <text>
To highlight element found on previous step and add comment close to highlighted element. -
Scroll to it
Scroll browser window to found item.