How to handle text not found in a drop down field

Hello and thank you,

Please see the images below

I have a contextual drop down (the contents change based on what is clicked on the webpage) and I need to click on “Update Activity” when it exists. When it does not exist I need to do another process.

1
2

My issue is that I do not know how to read if “Update Activity” exists. Is it possible to read a drop down? How do I surmount this hurdle?

Thank you in advance

Hi @mworth123,

Are you using select item activity? or just using clicks? What you would normally do add error handling if it’s not there using a try catch activity.

@rmunro

I’m using a Select Item activity but when the Update Activity option isn’t there it errors out. is there a way in the Select Item activity to handle the error? I didn’t do a Try Catch. I did use a Text Exists activity with an If statement to handle True or False but I haven’t had time to test it

What do you think is the most elegant solution?

There is only two things you can do? Like select update activity or select something else? Or is there an infinite number of options you can select?

If there is only two, you can add a try catch to select update activity and in case of an error select something else. Or you can do an element exists to see if the option exists, and based on the result do what you want.

Now if you have multiple choices you need to create a table to know witch values you should click based on the previous selection.