Functionize ML searches for any element that is remotely reasonable to the element being searched for in an effort to reduce maintenance. If an action is assigned as an Optional Action it happens every execution even if the element is not displayed on the screen.
Use Case for Creating an Optional Verify Action for Click/Input Actions
When the element the user wants to select is not displayed on the page and that step is set as an Optional Action for a Click action, the test case fails every time. To facilitate an Optional Action, if they are Clicks or Input actions, is through the following workflow:
In Architect, create the test case with the most complex, longest flow that includes all optional actions. Before running the fully architected test case, go to Test Case Details >> Slider view and mark the step(s) as optional. See Making Steps Optional or Suppressed in a Test Case
It is important to add a Verify action that takes place before the Click/Input action to ensure the element(s) for the Verify (optional) step are visible.
Add a Verify Action
Add a Verify action, that takes place before the Click action, and mark it as an Optional Action. This is where human intelligence marries itself with our AI/ML. By doing this, when the Optional Action takes place successfully, the user can create dependent Decision Actions that only execute if that Verify Action (marked as Optional) was successful.
In the example below, after the test case has been architected, the user has added action 2. Verify text 'Fax' with a 2.1 Verify action, marked as Optional. This has been added before the 3.Enter fax no. in the field/3.1 Click action.
Notice the dependent Decision action at step 3.1 - "Execute only if Step 2.1 is successful". This step will only execute if the previous Verify action was successful.
To Make the Verify Step an Optional Action
1. Once the Verify step has been created, click the Optional Action checkbox for that step. This will identify the step as Optional. *Making the step optional is crucial for then creating decision actions (below)
To Create the Decision Action
1. Go to the steps that should only execute if the previous Verify step was successful.
2. Click on Action Log.
3. Under the Standard Attributes tab, scroll down to Decision Action field.
4. Select the Decision Action that allows the decision from the dropdown menu. Note: Only the steps marked as Optional Actions (above) will be available for selection.
5. Then determine the Decision Result Use as True/False. Example: Select True to create a Decision Action where "Step 3.1 will only execute, if the optional step (2.1) executes successfully."
6. Click Save.