The Agilitest capture tool is an essential component of the solution that allows you to select which UI elements to capture and re-use in the tests as action targets. Detailed presentation of this tool dedicated to the autonomy of the automation engineer, and the robustness of the tests !
What is the capture tool?
During the course of a manual test or an automated test, it is essential to define the target of each action programmed in the scenario. For example, a click action requires a target element on which to interact so that the test clicks on the right button, or the right interface element.
The Agilitest capture tool - also called locator - defines these action targets. It goes a long way in identifying the components of your applications, to set up detection rules tailored with the relevant attributes.
In practice, the capture tool allows to fly over the GUI elements of your web, mobile, desktop, or data structures (XML for your SOAP webservices, JSON for your REST webservices).
For each element thus overflown, the capture tool presents you the tree in which it is located, and the attributes which it has.
It's the same capture tool that allows you to capture the HTML tags of the DOM of your web applications, the Widgets of your desktop or mobile applications, or a graphical presentation of the data structures of your webservices.
In this sense, the Agilitest capture tool is graphic, versatile, and at the service of the multichannel aspect that we love.
Opening the locator
The Agilitest Capture Tool should not be run blank when you open the software, as it requires you to open the application on which you want to run it. Logically, to capture an element, you need an application on which to capture!
To begin, you need to create a project and then create a new ATS Script component. Then you need to create a channel open action, such as a Chrome browser channel. You can perform this first action with the button to the right of the line.
After opening the channel, you can finally open the capture tool with the magnifying glass "Capturer" icon located in the banner at the bottom right of Agilitest.
Using the locator
The Agilitest capture tool is composed of a "Capture Window". Its first button toggles between the HTML capture mode (for web apps) and the system capture mode for desktop elements. At the top right of this window, you will find the x, y coordinates of the cursor that can be useful to define eccentric clicks relative to the targeted element.
Mouse over each element of your application is accompanied by a tooltip specifying its type (either the name of the HTML tag for the web, or the name of the GUI component for the desktop).
The Ctrl key is used to capture the overflown item. There comes the second window "Parents of the captured element" which displays the captured element (at the bottom) and which traces all its parents to the root of the application. These parents unfold in accordion, and we can check the attributes that we want to retain to perform the detection of the element. These attributes are class, id, name, or even CSS attributes for web applications. Or, they can be of the TitleBar, Button, TabItem type for desktop applications.
Finally, the "drag-and-drop icon" in the editor allows you to use this detection rule in the element in an Agilitest action. You can drag and drop either after the last lines of the test (tooltip Create an action) or within an action line in the "Interface element" part.
Advanced features of the locator
Statistics on the captured item
On the "Parents of the captured item" window, the Statistics button allows you to check if the checked attributes allow you to recognize the item uniquely on the page.
Depending on the structure of the application, it may be normal to recognize several elements from the same detection rule (for example several menu items) and we can then specify in Agilitest which to retain by its index number.
But in general, it is better to uniquely identify elements, and to use id where possible.
Regular expressions (regex)
Regular expressions can be exploited in the Agilitest capture tool to match attribute parts.
We can then match this id with this regular expression:
The use of regular expressions brings an additional layer of difficulty, but their use makes it possible to treat simply the most delicate cases. The difficulty associated with regular expressions is therefore a lesser evil.
Graphic recognition of elements
Graphical recognition is possible with Agilitest, it allows to detect the presence of an element on the application and to count the number of occurrences. If it is not advisable to abandon the capture system by HTML attributes, the graphic recognition is complementary in specific cases of use.
For example, when the desired element has no id or exploitable class, graphical recognition is exploitable. And again, even on applications that are less well endowed with attributes, tips exist.
When the application includes Java, Flash, or 3D code embedding, the capture tool will not always be able to dive into the application tree to present the different interface elements in a structured way. In this case, graphical recognition allows you to perform actions or checks even in the presence of uncooperative programming framework with Agilitest. Learn more about graphical recognition.
Video presentation of the capture feature
Below is a 7-minute video that shows all the features developed above. Download the video.
Présentation de l'outil de capture Agilitest en 7 minutes
Why we developed such a tool
Agilitest is a simple product that can be used by a functional validation team that is not expert in software development.
As a result, anything that involves a developing technical background, or is too difficult for a non-expert, is discarded.
For the development of this tool, the KISS paradigm naturally applied to propose a simple and powerful tool.
Locator Agilitest vs. outils pour les développeurs
Certains développeurs web peuvent se demander l'intérêt de l'outil de capture Agilitest par rapport au panneau d'outils pour les développeurs proposés par les navigateurs avec la touche F12.
La question ne se pose pas longtemps tant l'outil de capture Agilitest se situe à un niveau supérieur :
- l'outil de capture Agilitest est multi-navigateurs : Chrome, Firefox, IE, Edge, Opera sont traités de manière identique ;
- l'outil de capture Agilitest est multi-canal et utilisable sur : applications web, webservices, applications desktop, applications mobiles ;
- l'outil de capture Agilitest ne se limite pas à survoler les éléments, il permet de régler finement les règles de détection et de tester leur unicité sur l'écran de l'application ;
- l'outil de capture Agilitest propose la reconnaissance graphique d'éléments en plus de la reconnaissance des attributs HTML.
Locator Agilitest vs. XPaths
Many test software applications use XPath as the query and element detection system in an application.
Detection is often assisted, and allows a relative ease in the creation of an XPath expression. The latter is therefore created and used, often without the automation or the functional tester have had the opportunity to read it and review it in view of their knowledge of the application.
This in our opinion is two reasons not to use XPath technology in Agilitest:
- No XPath expressions automatically generated without revision of the automation engineer or the functional tester
- No systematic test KO after updating the application.
Finally, the Agilitest capture tool seems to us more simple and pleasant to use.
If we were to summarize the main strengths of this locator, it would be its simplicity for the user regardless of the technology used, and the robustness of the tests achieved through its use.