What is an Element
Element refers to a UI field or control available in a page (Context). Before you can write any automated logic for an element, it must be saved in the Context. When you capture a View, accelQ analyzes the web page and saves meta data so that you can analyze elements when needed.
Element Repository
Element Repository lists down all the elements that are currently added to the Context. It allows you to manage element properties, once added. Element Repo belonging to a Context is shared with all actions that originate from this context.
Adding Element in a Context
To add an element to a Context, open the view which contains the element you are interested in.
When you hover on the view canvas, rectangular areas are drawn identifying the element falling in the current cursor position. Right-click on the rectangular area to access the contextual menu.
View canvas
In the context menu, select "Add to Repository". This brings up Element Explorer which displays the attributes specific to the element. You work with these attributes to setup Element Identification criterion.
Note: A rectangle highlighted in blue indicates that the element is not already in the repository, which an element in green indicates that the element is already added to the context.
Locating element on the canvas
View canvas allows you to hover around different sections of the page and arrive at the element you are interested in. In some cases, multiple elements in the View may be in a very close proximity and they may appear to be on the same rectangular area.
accelQ provides capabilities to arrive at the required element, in case there is such a contention. Once you locate the desired element, you can add it to repository. Following sections describe different approaches.
1. Overlapping elements
When there are multiple overlapping elements in a given rectangular area, but one of the elements is probably more prominent than the others, accelQ defaults the hover to such an element. An icon in the context menu indicates there are other overlapping elements, and when you click on the icon, you are presented with list of all elements to choose from.
If you need to add an element from this list, select required element and proceed.
2. Ambiguous Elements
This is a special situation of overlapping elements. This comes up when accelQ cannot make an automatic determination of a prominent element in a set of overlapping elements. It is then treated as an ambiguous element and none of the elements in the rectangular area are selected by default. when you right-click such a rectangular space, an element selection list is presented instead of showing the context menu.
Once you decide on an element from the list, the context menu appears automatically to add the element in the repository.
3. Switch-Element from Element Explorer
In a deeply nested element structure, sometimes it may not be possible to locate required element on the canvas directly. In such a case, choose to add the element that appears on the view and while you are in the Element Explorer, you can switch to desired element in the DOM hierarchy.
Navigate in the nodes on the DOM tree representation (left side) and click on desired node. If this is the node you want to work with, click on the small "switch to" icon in the top right corner of the attribute section.
Comments
0 comments
Article is closed for comments.