Error in Program Running

Hello guys, I would like to ask what it means. The robot works for the first few seconds and then suddenly pops up this error message.

error in UiPath typically occurs when a previously identified or interacted-with UI element, such as a button or input field, becomes inaccessible or changes in some way. This often happens if the element’s properties, like selectors, are no longer a match due to changes in the application or webpage. To fix this, you need to update the selector or use other methods like image-based automation to reliably interact with the element.


I’d guess you are clicking something or entering text or whatever on the page that causes page elements to reload/refresh and your Get OCR Text is happening too quickly so it grabs the UI Element which then refreshes and causes this error. Show us your code.

Sorry, I am still confused about it, how can I get the real-time data from the website and record it in Excel?

This is how I write the robot, I try to extract the real-time stock price into the Excel file.

1.Create a column by using the build data table

  1. Your extracting with get ocr text right after that create a variable

  2. Take add data row activity and pass that variable like this {yourvariable}
    And give the dt of build data table output

  3. Use the write range workbook activity to write the excel file


I’m asking what happens before that.

Also, is this a real-time updating web page? If so that’s your problem.

Hi @CHAN_Hiu_Fung_Victor_Stud ,
You need edit default of selector and attribute of get text OCR, because UI element can be change, when it change → our UI activity will fail (like your activity)

hope it help,

1 Like

Hi @Nguyen_Van_Luong1 , thank you for your help, as I just started my RPA learning, I would like to ask what I need to edit the default of selector and attribute of get text OCR, so that I can extract the real-time data from the website

@CHAN_Hiu_Fung_Victor_Stud This depends on the website, each location will need to adjust this selector, to be compatible with web changes, this is most evident when running the code on another machine, you can share the website that and the location to choose? I will point out the areas that need to be changed

This is the website Tesla, Inc. (TSLA.US) - Real-time US Stocks Quote, the location is shown in the image ( the real-time stock price).
Million thank!!!

Hi @CHAN_Hiu_Fung_Victor_Stud ,
I tried with this website and I want to know you need get text from that location or we mandatory use " get OCR text", I tried with “get text” it will get text from that location

with this case, I see get OCR not correct, OCR usually get text as image
how about you think this case?

The selector isn’t the problem. This error message is caused by the activity finding the element then the element disappearing/refreshing while the activity is processing.

To my understanding:
Most beginners with UI automation usually don’t edit it.
As you know, ui automation activity can fail when element is not found, right?
The other message shows that there are many cases, one is that the page has not loaded in time to display that element, two is that the selector is not correct in all cases,…etc.
Most basically, we have to edit the selector and adjust the time delay before get text, wait page load success,…
What do you think is the solution? What is a better solution?

@Nguyen_Van_Luong1 Thank you for your help! I will try to write the program base on your recommendations, thanks a lot!

Cheer @CHAN_Hiu_Fung_Victor_Stud ,
Happy automation
ask forum any questions about UiPath

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.