Pick Branch working intermittently

Dear Sir/Ma’am,

I am currently working on Native Citrix Automation for one of the process which involves automating web applications inside citrix. To launch the web application, I am double-clicking the Internet Explorer shortcut in the citrix desktop. Considering the possibilities of IE shortcut shown as unselected or selected, I have used Pick activity with the possibilities inside Pick Branch as shown below. But I see it doesn’t work consistently. It throws SelectorNotFound exception in some cases but if you go back to Studio and validate the selector it validates to detected. Am I missing something to make it work consistently? Please help.

Also to let you know I tried Open Browser activity but it opens the browser in the parent window and not inside the citrix desktop. We would like to work with the seamless mode of the citrix window and not the full screen mode and that’s the reason why I am launching the browser by clicking the IE shortcut in the desktop.

See if this post helps you:

Thanks for your message @bcorrea but this doesn’t help. Like mentioned in my original query, I am using Native Citrix Automation with Remote Runtime. Selectors are generated properly inside Citrix Desktop.
It is just the Pick Branch doesn’t work consistently.
If I use Flow Decision or Nested If, it works perfectly fine but curious to know why Pick Branch is not working consistently.

The selectors seem correctly set. As shared in the screenshot before, in the Pick Branch activity, Trigger is Element Exists activity, Action is Click Activity. The SelectorNotFound is detected at the time of Click activity. The same selector is used in the Element Exists activity in the Trigger section; that worked fine but click didn’t! So curious to know why the element fails to get identified at the time of Click activity which earlier got successfully identified at Element Exists activity?

Hello Siddarth,

I had the same issue before trying to use multiple selectors within a Pick activity. I believe that UiPath is only able to search for a single selector at a time and is not set up for the asynchronous search that you’re hoping for. I also had to go back to conditional statements. However, you can do the first element exists outside of an if-statement, then only search for the other two if the element was not previous found. If none were found, then you may want to throw an error.

I hope that helps,
Derek

1 Like

@Siddarth_Nair

My team and I have noticed that pick branches don’t necessarily work like you would expect them to. A Trigger will activate if an element exists OR the activity timeout is exceeded. The Pick itself will pick the first trigger that completes one of the 2 conditions above. (At least in our experience and environment this appears to be the case).

3 Likes