Abstract Element refers to a place-holder for a UI Element that an Action logic needs to interact with. In a fast-paced agile environment, you may not always have access to application UI when you are developing automation test logic. It is possible that the development team is still working on UI development or the application environment may not be stable enough to support continuous access.
An abstract element is indicated with an icon in the Element Repo sidebar as below:
How to create an Abstract Element
You can either create an abstract element explicitly from the element repository by clicking on "New Web Element" or more contextually when you are developing Action logic.
Creating Abstract Element from the element repository
Click "New Web Element" in the Element Repository sidebar either in the Action logic or in the Context page.
Provide a name and Element Type for the element. If you are not exactly sure about the type of element, you can select "Generic Element" and it can be adjust during reconciliation.
Creating Abstract Element while working with a statement in Action logic editor
For an existing statement or when creating a new statement in Action logic, you can contextually create an abstract element for an argument that expects a UI element. Provide a meaningful name and select the type of element. Optionally, if the synch element is not yet set up for the Context, you are required to select if this new element should be marked as synch element.
Creating Abstract Element from the Action statement
One of the powerful features that allow early testing and in-sprint automation in ACCELQ is Abstraction. ACCELQ app abstraction goes beyond typical modeling tools in that, the representation is natural, intuitive and to the finer level of practical detail. This enables seamless progress of testing, without getting blocked by dependencies.
For a UI based application, access to the test application is one of the major hurdles for early test automation. In ACCELQ, you create abstract elements and make progress with test logic development. When the test application becomes available, you go through a process of “reconciliation” which allows you to map the abstract elements to the real elements on the screen. This process brings identification attributes into the element description so that they are recognizable at run-time. None of the existing test logic needs to be changed.
Element reconciliation could be performed either
- Between an abstract element and an element in the view or
- From an existing element in a view to another element in the same view or a different view.
Latter case is possible when you have changes to existing application screen (completely new design or layout).
Reconciling an Element
- Navigate to the view which contains the new element (either from Context or from Action Logic editor).
- Right click on the new element on the view and select Replace an existing element in the Context menu.
- Select from the probable list of elements that need to be replaced. Click on Confirm.
- In case the list does not include the element you are looking for, click on Show all elements link to display the full list of elements.
Reconciling an Element