The target Element was not specified for this activity. You should set its Target property or use this activity inside of a scope activity (Attach Browser, Open Browser, Open Application, Attach Window, Get Active Window, Element Scope activities).
I have narrowed it down to the Find Children activity. The automation works fine for hundreds of records and then out of nowhere we get the above error. The Target property is, of course, set for the activity, and it is inside a Use Browser (previous activities within the Use Browser work fine).
According to a screenshot taken at the moment the error occurred, the automation was on the correct page etc and everything was fine. The error makes no sense because the Target IS set. I can click Edit Target for the activity and it validates fine.
Could the issue be that the Find Children activity is a classic activity, but it’s inside a modern Use App/Browser? Again, the automation works fine 99% of the time.
I’m sorry but you aren’t paying attention to what the issue is. The automation WORKS FINE 99.9% of the time. The error isn’t in Studio. It happens rarely when the automation is running. The selectors are fine, I’ve tested them in Studio. The activity is within the proper scope, and other activities before it work fine within that scope. Explicitly passing window selectors in every activity is incorrect. They are inherited from the scoped activity.
Interesting. This might be some memory issue is what I am suspecting or as you say due to the mix of modern and classic activity. Could you try one of the following? Not a fix but it might help avoid random errors.
Allocate the selector value / string to a variable and use the variable instead. Scope “Use browser”.
A retry scope on the find children activity with a max retry of your choice. This however might increase your execution time.