I have a strange issue with Java application. I need to get the attribute called ‘VirtualName’ of an element (checkbox). It contains a number that I can extract to reliably access similar fields:
(the first checkbox will have the attribute VirtualName equal to CheckBox12, the next one CheckBox13, and so on; the fields have always the same increments, but can have different base number)
The issue:
Activity ‘Get Attribute’ returns the string “CheckBox12” only when I first manually checked the selector with UiExplorer…
Once again - if I freshly open the app and run the Get Attribute activity, it will return nothing (default value of my variable, thus 0). If I try to access the field with selector based on the “CheckBox12” string, it will fail.
However, if I point to the element with UiExplorer, it will immediately start returning the correct value of the attribute (12) until I restart the app. In fact, if I run a click activity on the ‘broken’ checkbox and then select the field with UiExplorer, it will immediately work.
It seems that my attribute is only getting initialized when I use UiExplorer on the field. Is there anything I can do to avoid having to manually ‘initialize’ the field?
It is definitely the weirdest bug I had so far.
EDIT. More details.
The error that is thrown when the selector is not ‘initialized’ by UiExplorer is this:
Once again, if I select the element with UiExplorer while the Robot is trying to find it, it will instantly succeed.
So I guess my question is - what is UiExplorer doing to my Java app that initializes the selector?
@andrzej.kniola Would you have a clue? (I noticed your name in a few posts with this error message)