web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

If UI element exists

(0) ShareShare
ReportReport
Posted on by 8

Hi All,

I have a web page on which I had created a process using PAD. 

  1. I have used "Wait for web page content" action to wait for web page to load.
  2. Once web page is load it will give screen where either element is load or error screen is load.
  3. Error when element is not created due to erro 
  4. Error - Element is not existError - Element is not exist
  5. Screen when element is loaded.
  6. Element ExistElement Exist

I want to check and set a variable if element is not loaded and error is displayed. So want to check if that is possible?

 

Thank You

VJ

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    I have done something like this before:

     

    • Loop 1 to 9999 increment of 1
      • If element exists %CorrectPage%
        • Exit Loop to continue process
      • EndIF
      • If element exists %ErrorPage%
        • Stop Flow with Error
      • EndIF
      • Wait 15 #or however long you want it to wait in between each time it checks for either page
    • End #Loop

     

    This will check for both possibilities every 15 seconds (or whatever you set the "WAIT" to).  If it finds either page, it will take the appropriate next actions.  

  • VJR Profile Picture
    7,635 on at

    Hi @VijaySingh 

     

    - Add the UI element for the text inside the below 

     

    VJR_0-1633494123653.png

     

    - Read the text from the above UI element. (This will happen after the page loads because you have given Wait for web page content)

     

    - After the page finishes loading if the text of the above UI element contains "Error occurred" then that means the element does not exist. 

     

    Also you can make use of the "On error" error handling to detect if any of the lines of code threw an error while reading or writing to it, indicating that the element was not found.

  • Verified answer
    VJR Profile Picture
    7,635 on at

    Hey @VijaySingh , and also how about making use of below action where you can check after the web page has loaded whether the element exists (use "contains element" or "doesn't contains element" depending on your requirements).

     

    VJR_1-1633505974703.png

     

     

    Here is the official documentation link to this action.

     

     

    VJR_2-1633506104869.png

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 167

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard