Skip to main content

Check Element Exists

Checks if a desktop element exists on desktop. If it does, the output will be true; otherwise, it will be false.

Category: Desktop Application Automation · Group: Desktop · Activity name: CheckElementExists

The CheckElementExists activity in the designer

Example

outputVariable = CheckElementExists("<xPath>", checkOrphanedElements=False)

Inputs

NameTypeRequiredDefaultDescription
XPathstringYesXPath expression that identifies the target element.
Check orphaned elementsbooleanFalseWhen the element is not found by its XPath, scan the parent window's area for elements detached from the UI Automation tree. Slower; enable only for windows known to orphan their elements.

Outputs

NameTypeDescription
outputVariablebooleanSpecifies the name of the variable that will store the boolean result.