Decision Actions Overview
The 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 the 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 below.
Create a Decision Action in an Existing Test
-
Open a project and select a test to view the Test Details page
-
Click View Results or any View button to the right of any action to open Slider View
-
Select the Decision Action
-
Insert an action before the Decision Action and select Verify
-
Select the element to be verified in the screenshot
-
Confirm the verification and click Insert
- Close Slider View and return to the Test Details page
-
Expand the Verify Action to open Action Settings, check the Optional action flag, and click Save for the action
-
Open the Action Settings for the Decision Action and select the Advanced tab
-
Select the step number for the Optional Action that will be used for the Decision Action
-
Select the Decision Result Use to use (read more about this option below) and Save the changes to the action
-
The Decision 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 Action was successful or unsuccessful. By default, they are triggered when the result of the Verify Action 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 Action to successfully confirm the banner is visible followed by a Decision Action to click 'Accept.' You could then clone the verification and set the next Decision Action to open a menu when the Optional Verify Action is unsuccessfully able to confirm 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 a project and select a test to view the Test Details page
-
Expand the Verify Action to view the Action Settings
-
Check the Optional flag and Save the action changes
-
Open the Test Actions menu and select Decision Actions
-
Check the box next to the Decision Action and click Update
-
Select the appropriate Decision Action based on the Optional Verify Action above
-
Select the Decision Result Use value based on the conditional use case and click Submit
-
The Decision Action will now display the condition that it executes only if the Optional Action is successful