Skip to content

Suggestion: use @step instead of more specific decorators #98

Open
@mbt-eric-b

Description

@mbt-eric-b

Step definitions in expectations.py are using the decorator @then
This makes it mandatory to use the keyword Then in the scenario for these steps.
Why not simply use @step instead of @then, so that the scenario can be written with any of the keywords?

For instance:
@step('I wait on element "([^"]*)?"(?: for (\d+)ms)*(?: to( not)* (be checked|be enabled|be selected|be visible|contain a text|contain a value|exist))*')
makes it possible to write
When I wait on element "myButton" to be enabled
but also
And I wait on element "myButton" to exist
or
Then I wait on element "myButton" to exist

while the current implementation only allows the last syntax.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions