If you've never created a BDD test, it might be worth reading the "Your complete guide to BDD testing with OutSystems" (https://www.outsystems.com/blog/posts/bdd-testing/) before continuing.
By default, all tests will be run against the entire web block. This means that if you do not use any of the Element Selector actions, all of the Elemment Manipulation actions will apply to the entire web block. In order to test the content of a web block, you should to be able to select a specific element in the web block.
All element selectors output "IsNotFound" as a boolean. which allows you to test the existance of an element.
Once an element is found, it becomes the "current selected element", and all Element Manipulations will be inside of this.
Selects the first child of the currently selected element using a CSS selector. If the selector matches more than 1 element, the first is chsoen.
For example: The following flow will select the first Input element inside of the web block.
This searches the entire web block for an element containing the specified text.
In cases where the web block is large, you can set how many elements upwards to check (Default: 10)
The following example will find an element that contains the test "Field Label"
This is will select the specific element specified using the CSS selector inside of the web block. If the selector matches more than 1 element, the first is chsoen.
The following example will find all radio input elements and select the first one.
Selects the parent of the currently selected element. If no elements has been selected, or the currently selected element is the web block itself, nothing happens.
All Element manipulation actions are executed against the currently selected element.
Clears the value of an input. Only works with Input elements and does not work with any other element.
Clicks the currently selected element. This can be run against any element, and will act like a regular mouse click (left button, single click).
Allows you to change the value of a dropdown/select box. If the dropdown allows the selection of multiple values, simply add the values to be selected into the ValueList input parameter.
Types in a string the same way a human would. This will not clear the field, and always start typing from the end of any existing values.
Using the same method as BDDFramework Client Side, you can use URL parameters and Tags to specify which tests should be run, and which should be excluded.
To add a tag, create a test and add a Tag block in to the Tags placeholder:
The following URL parameters can be used:
SkipTags=
ExecuteTags=
To execute only tests with a tag "NameInputField", you could use the URL: https://my-outsystems/MyBDDFrameworkModule/MyTestsuite/?ExecuteTags=NameInputField
"NameInputField"
To skip tests with a tag "LastNameField", you could use the URL: https://my-outsystems/MyBDDFrameworkModule/MyTestsuite/?SkipTags=LastNameField
"LastNameField"
To execute only Tests with tag "Box" but skip tests that include the tag "Red-Box", you could use the URL: https://my-outsystems/MyBDDFrameworkModule/MyTestsuite/?SkipTags=Red-Box&ExecuteTags=Box
"Box"
"Red-Box"
This module does not include API functionality, but is fully compatible with BDDFramework Client side. For more information, visit https://www.outsystems.com/forge/component-documentation/10917/bddframework-client-side-o11/0