Element Identification is one of the fundamental components of UI test automation. At the time of test execution, runtime engine makes use of the identification criterion to uniquely spot the element on the application screen. Once the element is identified on the screen, specified operation is performed on it.
With the advent of UX centric and dynamic web applications, element identification has become a complex activity requiring a deep technical understanding of the underlying DOM structure. accelQ takes an innovative visual approach to make this process intuitive and reliable.
You manage element's identification criterion (also known as Selector) using Element Explorer. You can open Element Explorer by clicking on an existing element in the Element Repository side bar of a Context or Action logic. You are also presented with Element Explorer when a new element is being added.
By default, anytime a new element is added, accelQ runs a comprehensive neighborhood based algorithm to identify attributes that are good to be part of the Selector.
Layout of Element Explorer
accelQ element explorer seamlessly brings the entire DOM hierarchy of the element to help build a stable identification criterion. At any point, the selector could include any number of nodes in the hierarchy.
Left side portion of Element Explorer displays the element hierarchy (from the DOM analysis) as a tree. This can be expanded or collapsed by clicking on the icon in top left corner. Node identified with "E" indicates the element being evaluated. "A1", "A2" etc. refer to ancestor nodes. "D1", "D2" etc refer to descendant nodes for the element in question.
Clicking on one of the nodes in the tree displays its attributes on the right side and each attribute can be selected/deselected.
Footer area in the attribute screen shows the number of matching elements with the specified identification criterion.
Bottom portion of the screen shows list of nodes that are currently part of the element selector.
Footer area of the screen displays a checkbox to mark an element as a Repeat Element.
Updating Element Selector
accelQ by default, constructs identification criterion for an element. For any reason, if you need to modify this, you are guided by a visual interaction.
Click on a node from the DOM tree that you want to edit. You can select required attributes and also change values for these attributes. As you make these changes, accelQ calculates the match count dynamically and flashes the number for analysis. These matching items are also highlighted in the corresponding view canvas in the left side. Once you are done with the changes, you can either choose to save the updates or if the node is not yet part of the selector, you can chose to add the new node to the selector.
You can always reset the selector to the default system calculated value by clicking on the reset icon in selector area.