In some cases however, it is possible to rely on a class’ private implementation details. (Of course, such private details may vary across Java versions, so are not ideal.) In the case of the FormText class, there is a private member called model which itself has a member variable called accessibletext, and this contains the displayed text.
However, because the model member is a private member, Squish cannot access it directly. Fortunately, this can be worked around by using Java’s reflection API.
Here is an example that demonstrates how to do it: