Hi,
my Bot uses many selectors and when I validate this in studio everything is ok. But when the Bot ist running sometimes it stops with error:
cannot find the ui element corresponding to this selector…
In some cases (in debug mode) the retry button helps and the selector can solved an the bot goes on. It varies which activity throw out this error.
I think it happens with the packages or windows registry for uipath settings. Our company runs UiPath in a citrix metaframe environment with roaming user profiles.
Whenever you run the bot in a citrix environment we need to make sure these things
the window of the application must be maximized before searching or clicking an element, because the bot might not be able to search the field when the application is not in foreground as it might have got minimized, even though you have selectors valid…
So make sure the window is maximized that enables the bot to search for the element
make sure the element appears before clicking or searching, as some application may take some time to load a page and element might not appear suddenly once the page starts loading, so use a activity like on element appear or if its a image use on image appear to make sure that the element or image appear before clicking or searching, and if it is not it will fail even though the selector is perfect buddy
Make sure other users dont login while the bot is running as you say its a citrix environment with multiple users
Next sometimes it fails as you mentioned with some packages or windows not been registered with uipath setting and you make it clear with proper dependencies added to the uipath packages.
Thats all buddy you are done.
Kindly try these remedies and let know whether this works or not buddy
cheers @kreutlm
to 1. all the windows in the foreground and the windows with the focus. Is not possible to maximize all windows e.g. popup windows.
to 2. we use and tested with delaybefor (short or long = > 1 second), but didn’t helps.
to 3. in our development environment i was the only user on this server…
to 4. I don’t understand exactly what you mean, We tested the bot with various package versions and tested the update tool from the studio start menu (we use 18.4.4).
Any other idea?
In Addition 2 Screenshots:
this shows the selector for the small sapgui windows and studio tells me ok.
I think the issue is with there with second point you mentioned
kindly use a activity like on element appear , on image appear, with increased timeout MS with more than default value of 30 seconds, and the reason why i m telling to add this instead of delay is that , the activity will wait till the time in delay is reached even thought the element has appeared, and it would definitely hinder our performance, and moreover it wont make sure whether the element appear or not, but if we use on element appear or for image with on image appear with certain timeoutMS more than 30 sec, before the page where you feel its getting errored out or taking more time for the page to get loaded, it would search for the element till the time specified and will continue with its next activity only when that element appears…buddy
Thats why
Hope this would help you
Kindly try this and let know buddy
Cheers @kreutlm
please see the additional screenshots before your answer.
I’m expanded the bot with an element exist activity before the sendhotkey activity. Result is that element exist give true back and the sendhotkey activity ended with the error.
Buddy i wasn’t able to see the screen shots with your comment and you add the screenshot by editing the comment after a while, so thats why
alright Buddy no worries,
Kindly change the title attribute value with wildcard like this
title = ‘*’
and try buddy
Cheers @rikuhn