Select Item activity & error handling

Hello and thank you,

I have a Select Item activity and I need it to go to a drop down and click on Update Activity. In some cases the Update Activity is there and in some cases it is not. I need to handle both situations. If it is there then I am good and can continue. When it it not there I need to handle the error. Here is the image. I believe I need to use Try Catch but I’ve never used it before.
What do I put in the Catches section? I have an If activity which I’d like to insert but it doesn’t seem to allow it.
What is the best way? Would another method work better?

Thank you in advance


I suppose perhaps we should check if the dropdown has “Update Activity” using GetFullText activity before Select Item, as the following image.


1 Like

@Yoichi - Thank you, I am getting this error message. How do I resolve it?


check the variable scope of text that it is reachable for the if check. Also gie a try on renaming the variable e.g. to strText

As alternate approach in such cases with find children the DropDown items can be retrieved and evaluated. If it is found, tthen it can be used for clicking or selecting. Have a look here

1 Like

@ppr, @Yoichi

So text in text.Split is a variable?

text (in my case strText) is a variable of datatype String
Split is the method that you want to use