Web Element Condition
Description
Web Element Condition checks whether a web page element meets a specific condition — such as Is Displayed, Is Enabled, or Is Selected — and returns a Boolean result in a Web GUI [Classic] workflow. Use this step when your workflow needs to branch its logic based on the state of a UI element, for example, verifying that a button is enabled before clicking it or confirming that a checkbox is selected. The Boolean output is stored in a named field that downstream steps can reference for conditional decisions.
Configurations
| Field Name | Description |
|---|---|
| Web Browser Name | You can select any one Web Browser Name from the given list. Basically, you must select the same Web Browser Name which was selected in Start Browser Step. |
| Condition* | Condition to check on web page element. |
| Criteria* | Locate element on web page. |
| Criteria Value | Relevant criteria value must be specified. |
| Output field name | Name of the output field, which contains the evaluated Boolean value. |
Similarly, in Legacy Web Spy, the Output field name is available when you select Web Element Condition option in the Action field.
*Condition The following table contains the description of each condition.
| Field Name | Description |
|---|---|
| Is displayed | Check if web page element is displayed. |
| Is enabled Check | if web page element is enabled. |
| Is selected | Check if web page element is selected. |
*Criteria The table below contains the description of criteria.
| Field Name | Description |
|---|---|
| Xpath | Xpath defines the hierarchy of the tags through which you can reach to a particular element. For example /html/body/div[1]/div/div[3]/div[2]/div/div[2]/div/div/div[2]/div[2]/div[1]/div[1]/div[1]/span/span |
| Id | Id attribute of a web element can be best way to identify an element if it is present and is going to constant and unique. There are cases however when it is either absent or its value changes every time you access the application in the browser |
| Name | Name is another attribute of a web element which can be used to identify an element. |
| Link Text | If a HTML page contains a hyperlink element <a href=www.google.com>Search On Google</a>, you can identify this href element by providing complete text ‘Search On Google’ as the Link value. |
| Partial Link text | This criterion is same as Link, just that, in this case, you can give partial string for finding a match |
| Tag Name | Every HTML element has a tag associated with it. The element can be located using that tag name. For example, textbox has a tag <input>. |
| Class Name | Class name is the css class associated with an HTML element. If there is a div element <div class=’someclass’>MyDiv</div>, you can locate it by giving class name ‘someclass’. |
| Css Selector | This criterion is useful when an HTML element has multiple associated css classes. Consider an HTML element <div class="btn primary-btn submit"></div>. To identify this div element you can use Css selector as “.btn.primary-btn.submit” |
| Common Buttons | |
| Help | Click to see the Plugin description and configuration details. |
| OK | Click OK button to accept configurations. |
| Cancel | Click CANCEL button to discard configurations. |