Control errors

Dear All

I’m working with a litle automation with an excel users list with 1500 users. I’m trying to extract user_id from a web page using the email contained in excel file.
This first step is almost already (read excel…create dataTable, and I’ve captured the user id.
But in some cases the email is not found in the web page.
How can I control this?. instead of scrap user id page won’t show registers ,so The idea if the email is not found save the excel column corresponding of user id a message and continue searching.

I’m looking forward to your comments.


1 Like

Hi ,

1)Extract Email ID from Web page into strEmailID String Variable

Assign strEmailID = “Email ID not found for this user”
else {
3) Add to your datarow, the above variable. In that way, you get either the Real email ID or the message.

Hope this is what you are looking for. Else let me know.

1 Like

@Francisco_Morales, did u find the solution? if not let me know. I can help you on this

1 Like

I’ve done the if condition

but the rutine shows an error

Thanks for your help

Hi @Hashim_Shamsudeen

Not yet. I’m having problem with the condition to discard when users_id not found

If you can help, please tell me. I’ll appreciate your help

No worries, I will help you.
I think some other ui element(may be span element) laying on top of the particular UID you are trying to access. Please use the Ui Explorer and find out the exact element from the visual tree

Hi Francisco_Morales,

Kindly check once whether the element (user_id) you are looking does exist. If it exists you can get them and update in place wherever you want to. This can be done with “ELEMENT EXISTS”. Find the stable element near to userid which occurs whenever you get the userid, take that as the element and add it to element exists. If it appears we have output as true and we can get the userid by using get text as you did now, else if it its false update as “It as not available”. The advantage of using this is your workflow wont get stopped even when ui element is not able to be found.

one more kind suggestion with selectors. Please dont use id - index with selector, while you are trying to fetch data, because index may change from time to time, better use aaname attribute and table attribute in the selector.


Here is UIexplorer view

The when user_id is found, appears in aaname and innertext properties, but, how can do this selection (aaname for example) take different values, or the empty value when doesn’t find nothing

Here is de screen, when user_is is found

Here when not

thanks for your help

Hi @Palaniyappan

I’ve reviewed and the element user_id , and exist. In fact It has been saved returned in the excel file.


but when data not found, the selector must be nulll or empty, but simply shows me an error.

I didn’t understand at all the second suggestion. Well I understand, but I don’t know how to do it.
I’ve marked the aaname and tablerow attributes, but it hasn’t work

Thanks for your comments

Hi @Francisco_Morales,

Great. Lets do one thing. instead of expecting the selectors to be null or be with value, we will take the error message that occurs whenever no user id is found (the screenshot you mentioned when no user id found), because our ultimate aim is to continue with the process when no data is found.

So, kindly select the text that occurs when no user id is found using “element exist” or use “Image exist” if you are not able to select them as element.If that element or image exists, i.e., if no data is found, will update accordingly in excel else will update with the userid. This can be done inside the if condition. lets try this.


1 Like

@Francisco_Morales, Palaniyappan has a good idea. That makes sense for me. You can either try for his idea and if not working please try the below approach.

  1. After entering the Email Id in the website; use a Find Child Activity over the main table element(In the Filter property provide the expression to retrieve only the table row elements). This activity will give you a list of child elements of the table element.
  2. Get the count of the table row element
  3. If the table row count is more than zero you can use Get Attribute Activity and input the first child element and retrieve the “aaname” attribute. Which will have your User ID
  4. If not rows found, you can write to the excel that no User Id found.

Let me know if it resolves your issue.

I understand the logic. but is different when i try in the software jeje.
I’ve used Find children activitie and I had tried to show in a message box the table’s children. Always count 2 (when find or not find the user id shows 2 rows)

I’ll try extracting first the qty registered in pagination labels. Could result.

Thanks again

Yeah, you can try that. Else you can use the element exit activity with “No UID found” message on the table and build your logic on it

Here is how I did with imageExist activitie

The error always is in the getText (marked)

Thanks for your comments

Hi @Francisco_Morales

Kindly keep all the activities inside the container “Attach Browser” for the sequence within THEN Block in IF condition. And again dont use id as attribute for the tag, use aaname as attribute and use wildcard for the same as value, since it is dynamic in nature.


I’ve tried with picktrack activitie

Then I confirmed with a message if found or not found email.

Again. rutine downs in getText user_id
I’ve upload a video

Please replace your selector with wildcards(id=‘userListForm*’)

I’ve replaced my selector with *


I’m looking the following situation:
When email doesn’t found, the proccess should go to Else branch, but itsn’t do.
Although if email is found or not found goes to “then” condition in the if. I don’t know how to continue

Have you tried setting continueOnError properties?


Hi Carmen

I’ve setted continueOnError in true. The rutine doesn’t stop, but capture data with errors.
existing users it save as “not found” also It repeats user_id when save in excel

I had not thoght in this option, but I think Other validation would be neccessary to save right information