Selector changing mid run


#1

Hi Uipath,

I am running a process, which selects into an attach browser and does an activity with various clicks. This process needs to run for varying amounts of time. From the start until a certain point it finds all the selectors with no issues and goes into each if section (with another attach browser) and finds the selector there with no issue, but after the robot has run for over an hour, i get to a point where it goes into the same if section it always has done, but now i get the error saying:

"cannot find ui element corresponding to this selector: "

This has happened 3 times after it has run for around 1.5 hours. Doesn’t say which selector, but looking at my log messages it can only be the same attach window it previously hadn’t failed on (as the log messages end before and after this). However, my selector has a long number in it, to me, random, but must have some sense behind it, and I’m thinking because this process has run for such a long time, this number may have changed in the process?

Is this possible??


#2

This has now happened again, after I added wildcards to the selector. Same issue where it has reached this part of the process 5/6 times, but has now failed on the last attempt mid run, with no indication of what the selector is

any help would be great! thanks!


#3

Once the process fails, does it stop completely or do you have clean up code after it?
If you make it stop right then and there, you could use UiExplorer to see what is the proper selector for the window it’s trying to find and compare to what is in the workflow. Something has to be changed OR there’s an unfound instability.


#4

There is clean up code after it, and I have been able to see exactly where the selector has now changed.

However, I have just run again, all my selectors have wildcards now, but the same thing has happened! After about 1.5s worth of work the robot has stopped; I then went to try and stop the execution, but uipath was not responding, to the point where I could only end it using task manager on my PC.

could this be something to do with RAM space on the PC or soemthing i have in the code telling it to stop at this point every time??

I have version 2016.2.6442

Any help would be great, as I’m not sure what else could be stopping it at this point every single time


#5

Did you check what was the memory usage before you killed the process?
It might be that it’s allocating indefinitely (either by an error in workflow or memory leak somewhere).


#6

From what I saw it was 20-30% and now that I’ve opened it again, I can see that its using 30% of the RAM.

when you say allocating indefinitley, what do you mean?


#7

Looking into my logs, it excecuted the last selector, and then the process is meant to throw to the catch and another log message (using an append log method) is meant to come up, which it didnt. So either the throw failed (and im not sure how), or the append log. This process is a loop and should be running all day, but from what my colleague and I have seen, theres no clear reason why it would have failed here, when its worked for an hour and these are just uipath processes.

Looking at the file size of the workflow it stops in its over 5GB!


#8

*5MB :smiley:


#9

Sophie - hello.
I have had a similar issue. I’m working with an access database screen objects return different selectors … I mean … the same screen object returns different selectors !!!

I am extracting data from an object and sometimes IDX=‘2’ and sometimes IDX=‘3’ ???

It has taken me three days to pinpoint this behaviour … now I am know what the issue is … I can combat the problem.

  1. I don’t want anyone else to have the same pain as me
  2. I would be interested to hear of anyone else having a similar problem

Hugh
PS - I have called this behaviour Wandering Selectors


#10

Hi Hugh,

first of alll, great name for the issue!

secondly, yes, I also found this not too long ago! but my issue wasn’t actually the selectors in the end, it was the application itself crashing after running for over 2 hours, with masses of automation thrown at it!


#11

Hello Hugh,

I know this may be an old post but I am facing the same issue and it seems like “idx” is the culprit. It changes “randomly” as far as I can tell. My “attach window” selectors and “send hotkeye” selectors are all throwing error that they can not find a matching selector.

Did you come up with an solution?


#12

Have you tried a selector withouth idx? Maybe use an anchor…


#13

One solution is to use Click Image


#14

Or test test test test with different wild cards ( * ? )
and test with IDX and without IDX
As I said, I eventually gave up and used Click Image !


#15

I got a workaround working.
But I think that if tried to delete idx from the selector it told me that the selector is not valid.
Glitchy thing.


#16

Hi MaurerDa,

So what’s your workaround? :slight_smile: