Modern web applications allow complex interactions and use advanced data-binding techniques. It is a common occurrence for the pages to contain dynamic web elements that are presented with different attributes on each interaction.
ACCELQ provides comprehensive capabilities to address this requirement. Following techniques are discussed in greater depth in related article.
- Element identification utilizing neighborhood: This technique is utilized to identify an element by combining the attributes of the neighboring nodes, when the element itself does have stable properties of its own. You could involve the ancestor, descendant or sibling nodes in creation such definition. ACCELQ makes this process extremely intuitive with a visually driven closed-loop approach.
- Family of elements: When your test logic needs to deal with a collection of related and dynamic elements, this approach comes handy. As an example, you may have an e-commerce application displaying a set of Items. Each item consists of name, description, price, review rating etc. All these elements can be defined as part of the Item family and uniqueness is driven in the context of the family, rather than at the whole DOM level.
- Repeat element identification: As the name suggests, this technique is helpful when you have a set of exactly same elements repeating on the page. For the functional purpose, all these elements have same semantics. Such elements can be defined as Repeat elements with capabilities to configure extensively.
- Using regular expression patterns: This technique is helpful when the value of an html attribute has a set pattern, but not a fixed value. For example, the employee ID link in the top of the page, has text that starts with "EID" followed by a 5 digit numeric. Such elements can be configured with regular expression patterns.
In addition to these, it may sometimes be required to update identification attributes of an element based on the logic in your Action. For example, "profile" link in the top-nav of your test application may be recognized by the currently logged in user name.
You can update the element identification attributes at run-time by inserting appropriate statements in Action logic.
- Update Element Text Property: Allows you to change the "text" attribute of an element ID criterion in action logic.
- Update Element Property: Allows you to update any ID property of an element based on logical flow in the action logic.