Version 8.0.1 |
After the simple case in the previous section we will take a look at a more complex scenario now. Let's analyze how the text fields displaying the selected price information are treated, e.g. the final price text field. Like in the previous section we need to record some mouse clicks or text checks on those text fields. Then we need to navigate to the recorded components and analyze them. The figure below shows the current situation and our goal.
| |||||||
Figure 50.12: Simplification due to advanced class mapping |
We got some SPAN
nodes recorded. Here we have no
class
attribute, but an
id
attribute in the HTML. So, we can
conclude that the id
is very
specific to the particular field.
When you select its parent component, which
is a TD
node, you will find a
class
attribute with the value textfield
,
which corresponds to the actual component class. When you select
that component, QF-Test also highlights the entire text field on the web page.
So we can assume that a component with the value textfield
for the class
attribute represents a text field semantically.
Figure 50.13: Recording of SPAN text fields |
So, now let's extend the configuration of our 'Install CustomWebResolver' node.
We need to map the textfield
value as generic class
TextField
.
Therefore, we extend the category genericClasses
by
TextField: textfield
.
When you delete the previously recorded component, rerun the 'Install CustomWebResolver' node, reload the web page and re-record the component, you will get the following recording:
Figure 50.14: Recording text fields in "CarConfigurator Web" |
The text fields will be recorded as expected, and we even get rid of one level in the
component hierarchy. In addition, the text fields have QF-Test specific attributes
like the extra feature qfs:label
assigned.
The next section show a translation for components which contain data and how to access that data afterward. Such components represent data tables, trees or lists and are handled as complex components by QF-Test.
Last update: 9/10/2024 Copyright © 1999-2024 Quality First Software GmbH |
1. Cookies fonctionnels
Nous utilisons des cookies fonctionnels pour garantir la fonctionnalité de base du site web.
2. Cookies de performance et de statistique
Nous utilisons Matomo pour analyser et améliorer notre site web. Des cookies permettent une collection anonyme des informations qui nous aident à vous offrir un visite clair et facile à utiliser de nos pages web.
This cookie contains a unique, pseudonymized visitor ID internal to Matomo for recognizing repeat visitors.
This cookie is used to track from which website the anonymized user proceeded to any page or sub-page.
The Matomo session cookie is used to track the visitor's page requests during the session. The cookie is automatically deleted at the end of each session (website visit), at the latest after one day.
is created and should be then directly deleted (used to check whether the visitor’s browser supports cookies).
short lived cookies used to temporarily store data for the visit.
short lived cookies used to temporarily store data for the visit.