I currently have a project that shows me this bug from time to time:
Cannot find the UI element corresponding to this selector
I fix the selectors each time, but apparently they’re not stable enough. I am looking for a good, stable solution.
The robot works on a website where the login page can be in 2 different languages. It always chooses a random language. This is what my selector looks like now:
I added a wildcard after Production because the language also changes the words after Production.
What part of the selector do I have to change to make it dynamic enough? I’ve looked at the docs but I can’t really figure it out. Thank you!
If I were you I would put the selector in one language with a Try/Catch around it. Then in the Exception block define the selector in the other language.
This is what the pick/pick branch activities are for.
Use a pick activity, fill it with two pick branches.
In both you enter a find element activity. Each one to search for an object with one of the language selectors.
This is executed in parallel. The first and only option/branch chosen is the one that appears.
Now in the actions of each branch you create the activities to log in for that language.