Open mbt-eric-b opened 1 year ago
Sounds reasonable to me. I'd be happy to accept a PR to this effect.
IIRC, the steps are setup to match the webdriverIO steps but I don't think there is a problem expanding this, as far as I can tell.
Here you go: https://github.com/spyoungtech/behave-webdriver/pull/99 Thanks.
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 writeWhen I wait on element "myButton" to be enabled
but alsoAnd I wait on element "myButton" to exist
orThen I wait on element "myButton" to exist
while the current implementation only allows the last syntax.