How to catch 'RemoteException wrapping UiPath.Core.SelectorNotFoundException'

Hi everyone,

I have built a bot which is supposed to continuously scrape prices for defined products across multiple webpages to monitor price development.
The ‘get text’ selectors will work for all the featured websites, but if the price can not be found due to e.g. unavailability of the product, an error will be thrown and the bot will be terminated. You can see the error message in the attached Screenshot. I am sorry, that it is in German.

How can I catch this exception type in a catch block. I have tried with System.Exception, UIPath.Core.SelectorNotFoundException, System.Management.Automation.RemoteException already but none of them has yet catched the error.

I am new to exception types, so does anyone have an idea why it might not be working or what could be the correct exception type to catch the error?

Thanks in advance!


1 Like

in that case kindly use first a ELEMENT EXISTS activity and check for that element availability by choosing that element (the same selector as we have now for GET TEXT) and get the output with a variable of type boolean named bool_exists
–and use a if condition with expression like this
bool_exists = True
if true it will go to THEN part where we can use this GET TEXT activity or it will go to ELSE part where we can leave it empty
so that we wont face this issue

and moreover SYSTEM.EXCEPTION would work actually, i wonder why it didn’t
no worries kindly try the above method and let know for any queries or clarification
Cheers @nicortak

1 Like

This should work. Thank you very much for your quick help!!

1 Like

Cheers @nicortak

1 Like

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