admin@glassfish.java.net

GUI selectors

From: Lidia Marchioni <lidia.marchioni_at_oracle.com>
Date: Thu, 08 Jul 2010 14:52:52 -0700

Hello

I have a question with regards to GUI selectors. I've noticed that a
couple of GUI elements are no longer found in our automated tests for
Admin GUI. They were using xpath:attributes to find the elements. It
searches for an id of an anchor element, and that id has changed. Here
is an example:

old id: treeForm:tree:configuration:configuration_link
new id: treeForm:tree:configurations:configurations_link

I have a choice of using xpath:attributes or xpath:link that would
search for a link with 'Configurations' text (or xpath position based).
For images I can choose between xpath:attributes (tied to ids again) or
xpath:img, which searches for a particular "alt" text in an "img" tag.
Could you please advise me what approach is less likely to need updates
in the future? Are ids more likely to change than visible text, etc? I
think I should stay away from position based identification of elements.

Thanks
Lidia