Sequence Datascraping network error

Hi team!!

i have a sequence that scrap a table for each item in a cvs file, but sometimes the web page launch a error message when clic on “consult”.
how can i do to detect it, save the data that generate this error and re start the procces whit the next data row.

Cant Attached capture or image for newi :frowning:

Thank!!!

Hi @Christian_Cuellar,

Welcome to the Community Forum

  1. You can use Element Exists activity to check if an error message is displayed in the webpage. If it exists, you can Throw an exception.
    https://www.uipath.com/kb-articles/how-to-check-if-an-element-or-window-exists
  2. Then surround your main process in a Try-Catch activity. In the Catch field, you can catch your thrown exception and do your error handling there. Please refer below for more details and example.
    https://activities.uipath.com/docs/try-catch

*You might want to check the RPA Academy Foundation Training. Your problem is discussed in Lesson 12 Debugging and Exception Handling
https://academy.uipath.com/learn/course/511/level-1-foundation-training-20183

Hope it helps. :slight_smile:

HI @marci080 thanks for your reply, I made the first option, but the variable is always TRUE, it seems that it does not detect it when it appears.

I don’t take the second option because I have a sequence.

Apparently I can finally upload images :grin:
Thank you for your collaboration

As per my understanding by default, the Error1 value is FALSE. So when the UiElementExists activity detects the UiElement, then the Error1 variable will become TRUE. Thus, it detected your error element.

If the real problem is that it does no detect the Error Message, one thing to check is the Selector used. I noticed it starts with "<webctr.l.>. Is the UiElementExists inside the BrowserScope? If not, you could try using the Full selector with “”

By the way, my first reply meant after you had done No.1, you could do No.2 to process or log the error then proceed to your next item.

Great that you can upload image already. Maybe you can also upload your xaml, if ever it’s still not working. :smiley:

thanks for your reply, the selector are OK. attached .xaml file.

thanks :pray:

@Christian_Cuellar - I had this issue as well - for me this was because the element exists in the web page, but it was hidden. I needed to examine the properties to find ones that changed. In my case it was an attribute called “visibility” and I used the GetAttribute Activity to check its status.

I think your case is similar - the error message is in the page, but hidden (note the description of the Element Exists Activity notes that it finds it even if its hidden). When an error occurs, the page changes an element attributive that then makes it visible.

Not sure of your use case, but there is also the Find Element Activity - but note that this Activity halts the flow of the program waiting for the elements appearance - until either it appears, the program continues, or the timeout is reached (default 30s) and an exception is thrown.

i agree with sagacity. You can use the GetAttribute activity and get “visibility”, instead of the UiElementExists for this case. You can refer to this link for the possible values.

Similar inquiry for reference:

1 Like

@sagacity // @marci080 THANK YOU SOOOOOO MUCH!!! :clap::clap::clap:

I finally did it with Find Element Activity and a variable transformation

grettings!!

1 Like

Great to hear, @Christian_Cuellar! Glad we could help. Happy automating…

1 Like