If select option is not available then move to another activity

Hello Folks, I have an issue with my select option, my problem is if the select option is not available on the web then it should be moved to another activity.
This is my web select option…

This is my select activity.
try

If the select option is not available then it should go to write excel-like server is not available.
if select option is not available

and write to excel to server is not available like this
excel write not available server

Hi,

How about to check if there is target option in the Select in advance using GetFullText activity?
GetFullText activity will return all items in the Select as String type.

Regards,

Hi @Naveen_Kumar2

Before selecting the Server value, Please extract all the values under drop down. Then use filter activity to find whether the targeted server value is there or not.

If the filter row count is 0 then write the excel as Server is not available.

Thanks, Happy Automation.

Fee free to reach us at any time.

Use 2 click options one after one.
1st click to click the dropdown menu.
2nd click to click respective option. (Please find out this selector with index option. It can be increment and click desired option. Same selector also can be used to detect option name by using getText activity. Once you find desired open by this GetText activity then you can use click by using the same selector.)

Hope my inputs are useful.

Hey @Naveen_Kumar2

  1. You can use Element Exist with the target selector as the Option element of the dropdown with dynamic aaname or innertext

  2. One more way is to use Find Children to fetch all the available options and to check if the required option is present.

But I don’t see this method is efficient to do in this scenario as the above method involves a single step approach without any additional manipulation as the second method.

Thanks
#nK

@Naveen_Kumar2 can you try with system exception instead of SelectorNotFoundException…

i did not get…

can u plz make .xaml file???

1 Like

Hey @Naveen_Kumar2

Is that the public website you are using ?

Also, you will get that dropdown option from an Excel right which should be checked in the website ?

Thanks
#nK

no there is SelectorNotFoundException this type of exception.

yes this is public website
web link-https://botsdna.com/ServerAvailability/

1 Like

Thanks, @Yoichi for the reply GetFullText is not working in this UI Element.

Hey @Naveen_Kumar2

Here you go…

nmnithinkrishna_DropdownOptionCheck_01Apr2022_2306.zip (8.6 KB)

Hope this helps

Thanks
#nK

1 Like

will you plz send me pics of the Element Exist activity that you indicated? because of I am not getting the actual elements.

1 Like

Hey @Naveen_Kumar2

Did you get it or you want me to show ?

Thanks
#nK

1 Like

I get it by ur process, I couldn’t find like your Element exist selector so I just copied ur element exist and paste it in my orocess.

So plz send me pics where do u find valid attribute like aaname…

1 Like

Sure I found a valid aaname for the drop-down label not the drop-down itself.

1 Like

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