Validating Element Present But Not Visible with verify not displayed Action
The Element Not Visible validation is used to verify that a specific element on a webpage is not visible to the user. This validation is crucial for ensuring that elements disappear when expected or are hidden from the user's view. This action is applicable for web only
You can use this validation when you need to confirm that an element either disappears from the screen after an action, such as clicking a button or is never shown to the user initially. For example, a hidden menu or a pop-up that should not be visible.
Supported UI elements
The following tables lists supported UI elements for verify not displayed action:
| UI Element | Description | Example |
|---|---|---|
| TextBox | A text box is an input area where you can type or enter text. | Consider the example of a login page for a web application. After clicking the "Login" button, the username and password fields should disappear from the screen as the user is logged in. Using this validation, you can verify that both the username and password fields are not visible after the login action has been performed. |
| Button | A button indicates an action upon touch and is labeled using text. | When the modal window is open, clicking on the "Close" button should trigger the modal to close, returning the user to the original screen without the modal visible. |
| Label | A label is a textual tag or visual identifier providing information about a particular section of the interface associated with a UI element. | Use th validation to confirm that the label is not visible under certain conditions. For example, if a label is meant to appear only when a specific action is taken, such as hovering over an element or clicking a button. |
| Link | A link, whether a visual element or text, navigates you to another location within the same webpage, to a different webpage, or to various types of resources when clicked. | An example of a link that navigates you to a particular website landing page, allowing you to access various products. |
Adding verify not displayed Action
To add validation for element visibility in a Web, Desktop and M-App automation process, perform the following using an example scenario.
You can add verify not displayed action in the following ways:
Node Configuration Process
In the Node configuration process, you can add the verify not displayed action by following the procedure described in this article 'Adding or Modifying Default Actions.'
Record Scenario Feature
When recording a scenario using the Record Scenario feature, you can add verify not displayed. For more information, see 'Adding Default Action Step in Record Scenario Feature.'
Edit Scenarios Functionality
Upon recording a scenario using Record Scenario feature, you can add the verify not displayed action in the Edit Scenarios functionality. For more information, see 'Adding Default Action Step in Edit Scenarios Functionality.'