Catch Selector error from Get Attribute activity

Hi, I’m getting an exception where the selector is out of bounds because of reasons.
Unfortunately I don’t seem to be able to catch it, I’m guessing it’s because I’m not catching the correct type of exception, what type of exception is it throwing?

Hi @Eric46

Try giving selectorNotFound exception instead selectoroperation Exception.


1 Like

it looks like with an integrated anchored selector a link should be found when in the same row on another column Facility is the content of a span element.

As this row can be anywhere we would suggest to remove the tablerow=‘87’ part for not fixing it to a particular row.

With a defensive element exists we can check befor accessing and avoid selector exceptions

Hi, thank you for the reply, unfortunately this did not catch the error.


I am using a variable and a while loop to loop through the table rows, this is what the selector looks like:

I get the amount of rows from each web page from a text field because the amount of rows are varied, unfortunately the number of rows are unreliable and will sometimes indicate more rows than are actually in the table, which causes the selector to go out of bounds.

So the only path forward I see is to catch the error and continue to the next web page, as the loop has already gone trough all rows.

how many rows are in your datatable having value Facility on the other particular column?

Can you share a screenshot from it with us?

The amount of rows varies from client to client.

I use the text field “Counters (5)” to calculate how many rows to loop, but sometimes this number is incorrect and there will be less counters than it says in the text field.

cannot the see the answer to the question. Cannot see the value Facility in Facility column.
It looks like you are trying somethin different compared to what you have implemented.

So whats the case about? What is to achive from viewpoint of Business Process

Each customer has a page like above.

I use the Get Attribute activity and grab information from the red and green bars to the right.

The goal is to loop trough each customer, then loop trough each customers counters and use Get Attribute activity.

As you can see in the above image it says there are 48 counters (or rows) but only 9 counters are active and visable, this will cause my loop to get the error.

I wish to catch the error and break the for loop to continue to the next customer.

have a check if with following advanced datascraping techniques your task can be solved.

Currently we do understand the motivation of using get Attribute.
We do not understand the need of integrated anchored selector, as in your case description ther is no click link described.

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