|Improved Web Component Recognition|
When closely comparing our own recordings with the events of the sample test-suite from the first chapter, we will notice slight differences in the recorded components.
E.g. when recording a click to the "I5" vehicle in the table we now may get a recording
Mouse click [VehicleTable.td] whereas in the demo suite it was
Mouse click [VehicleTable@Model&5]. When replaying them, both trigger the
same action and click the cell in the sixth line of the Model column. So, why are the
recorded components so different and why is this important?
Web applications have a limited set of basic components, which can be combined in
flexible ways in order to implement complex components and
designs. E.g. HTML tables are used
both, for just controlling the page layout and for displaying logical tables, like the
VehicleTable. Without additional information, QF-Test cannot know where exactly the layout
table ends and the logical table starts. This is why QF-Test records the component
VehicleTable.td in the newly created test-suite. The "td" is derived from the
HTML table data element "TD" and indicates a table cell, but nothing more. QF-Test is not able to assign
a logical table row and column.
The demo suite
FirstWebTests.qft of the first chapter installs so-called
"Resolvers" during the setup that generates this additional information. They tell QF-Test
e.g. where the logical table starts and which special properties it has. Then QF-Test is able
to determine the logical row and column for the cell as visible in
VehicleTable@Model&5. The resolvers have been implemented specifically for
The following figure shows the resolver registration node in the
FirstWebTests.qft with some configuration parameters.
||Figure 11.15: Web resolvers as installed in the FirstWebTests.qft|
Note At this stage it is just important for you to know about the option to improve component recognition by the use of resolvers.
QF-Test automatically analyses the structure of web applications, detects the most common web UI toolkits (like Angular, ExtJS, GWT, SmartGWT, Vaadin,...) and installs the respective predefined resolvers.
Obviously, not all web applications have been developed using a toolkit, some use extended toolkits and not all existent toolkits have predefined resolvers with QF-Test. Hence you may come across custom component implementations.
So when you start testing your own web application and encounter issues with components not being accessed as reliably as expected, there might be the time to at least think about a resolver to improve the recognition behavior. Please get in touch with our support (firstname.lastname@example.org) then for assistance.
There is also a chapter in the technical reference part of the manual with more in-depth information about CustomWebResolvers and how to start an implementation on your own if you wish to do so.
|Last update: 7/8/2020
Copyright © 2002-2020 Quality First Software GmbH