Decision Actions are created to make an Action dependent on a previously executed Action. This creates a conditional workflow for one element of your test.
To facilitate a Decision Action, an optional Verify Action must happen before your conditional Action. The Verify Action must take place first to confirm the absence or presence of the element you are testing. Most commonly this is used with Click and Input Actions to confirm a certain link or field is visible before interacting with the element.
For best results, when recording in Architect be sure to add Verify Actions before interacting with elements that may be part of a conditional test workflow. If you have all the Verify Actions you need, skip to Step 7 below. If you need to add one or more verifications to your test, start at Step 1.
Create a Decision Action in an Existing Test
-
Open your Project and select your test to view the Test Details page.
- Click View Results to open Slider View.
- Select the dependent Action.
- Insert an Action before the dependent Action. Select Verify.
- Select the element to be verified in the screenshot.
- Confirm the verification. Click Insert.
- Close Slider View and return to the Test Details page.
-
Expand the Verify Action to view the Action Settings. Check the Optional Action flag and click Save.
- Open the Action Settings for the dependent Action. Select the Advanced tab.
- Select the Decision Action step.
- Select the result to use (read more about this option below). Save the changes.
- The dependent Action will now display the condition that it executes only if the optional step is successful.
Decision Result
Decision Actions can be set to execute if the optional Verify was successful or unsuccessful. By default, they are triggered when the result of the Verify is True, but you can alternately select False. These can be set up in combinations to perform limited conditional workflows.
For example: Your site displays a banner informing the visitor about site cookies upon first visit. Once the "Accept" button is clicked, the banner clears. One way to confirm this is working properly would be to set an optional Verify to successfully confirm the banner is visible followed by a dependent action to click Accept. You could then clone the verification, and set the next dependent action to open a menu on the Verify unsuccessfully confirming the banner is visible.
Note: This type of workflow could be executed more easily with custom JavaScript code or utilizing Not on page verifications.
Create a Decision Action - Alternate Method
-
Open your Project and select your test to view the Test Details page.
-
Expand the Verify Action to view the Action Settings.
- Check the Optional Action flag. Save the Action change.
- Open the Actions Menu. Select Decision Actions.
- Check the box next to the dependent Action. Click Update.
- Select your optional Verify Action. Click Submit.
- The dependent Action will now display the condition that it executes only if the optional step is successful.