In some rare cases, the UI Spy can "see" the elements of some applications, only when the elements are actually visible on the computer screen.
For example, we have noticed a case where the elements of a PDF opened with Acrobat Reader, are visible to the UI Spy, only when those elements can be seen by the user as well (without the need to scroll).
The elements may not be accessible by the UI Spy, because of one the following two reasons:
- The elements are located in a place of the document that is not directly visible on the screen.
- The elements do not appear on the screen at all, because we have zoomed out a lot or the screen resolution is very small.
As a result, the UI Selectors that the Robot uses to access the elements depend on the view of the window.
In order to tackle this issue, consider the following:
- Increase the resolution of the screen.
- Maximize the window of the application.
- Zoom out of the window of the application. Note that zooming out too much would cause the elements to disappear.
What you actually see on the screen when extracting the controls of the elements during the development of the Process, should be the same as what the Robot sees while it is running.
If the above is not feasible and you would need for example to scroll down to make some elements appear, then it would be required to create dynamic UI selectors that are based on how the application appears on the screen.