I’m trying to automate selecting a textbox in a software and inputting a variable, however I noticed that when I do the recording, reopen the software and then play the recording, its not finding the textbox. This is because the AutomationID is changing every time i reopen the software and record again. Everything else is identical to the first recording. When I remove the AutomationID in my selector, it unfortunately cannot detect the box anymore.
Is there any fix or workaround for this specific problem?
Sorry to hear that, this will make it painful to try and automate then.
Are you using short selectors (Settings → Recorder Plugins → Windows)? If no, try enabling generate short selectors and enable Search Descendants and see if you are lucky. The item you need to find is unique enough to be found this way, after you removed the automationid again.
If not, then, this is going to be painful. Do the reverse of the above. Go to Settings → Recorder Plugins → Windows and disable generate short selectors. Re-record one of the selectors; it should now contain many more elements. Copy the entire selector into Notepad or something, delete all automationids, and then cut all elements except the first 3. Use that in OpenRPA and click Highlight to make sure it can find the element. If yes, then move on, add one more element and click Highlight. Did it find the right element? If yes, move on.
When you hit an element it cannot find, add an attribute IndexInParent with value 1 (0 is the same as not having it added) to the last element and click Highlight. Did it find the right element now? If no, then use 2 and try again. With a little bit of luck, you can brute force your way through the selector like this and end up at the element you need.
unfortunately, both options were already enabled. I’ve also tried disabling both options just to try it out, but no success either.
when I started using IndexInParent, the highlighting behaved a bit weirdly. For the first few indexes it successfully highlighted elements like the main window, but then suddenly stopped finding anything to highlight. I’ve tried up to like 30, but no success.
I’ve “solved” the problem by navigating the software via keybinds. Although it’s “unsatisfying” to have to do it this way, it seems to be working and is good enough in this case. I will make sure to try out the solutions recommended by you should I run into similar problems again.