Skip to main content

If Web Element Exists

Command description

Check whether the specified element exists on a webpage and execute the indented child commands when the selected condition is met. For example, check for a login element before running the login commands.

Command Input Parameters

input parametersInput parameter typeDescription
Webpage ObjectWebPageWebpage to check
Web ElementstrCaptured web element UID, not its name or ms-rpa-id
Element StateenumExists, Does Not Exist; run the child commands when the condition is met
Element Wait TimeoutnumberMaximum time to wait for the element to appear or disappear, in seconds

Command Output Parameters

None

Element status

  • Exists: Wait for the element to appear, up to the configured duration. Execute the child commands if it appears.
  • Does Not Exist: Wait for the element to disappear, up to the configured duration. Execute the child commands if it is absent.

Type definition reference

tip

Example

FAQ

See Web Automation FAQ