Comboboxes mostly consist of textfields or buttons. If the user clicks that component a list
of items is shown. The user can then select an item. To resolve a combobox correctly,
you need to map the combobox
with the textfield and the components for the list and its items.
HTML SELECT nodes will be mapped to ComboBoxes automatically.
The selection of the list item will be recorded as a 'Selection' node.
Class
Required components and sub items
ComboBox
Container component which contains a textfield and the button.
List:ComboBoxList
Represents the List component, contains all list entries.
Item:ComboBoxListItem
Represents the individual list entry.
Optional sub items
Button:ComboBoxButton
(Optional) Represents the button opening the selection list.
TextField:ComboBoxTextField
(Optional) Represents the textfield receiving text input and showing the selected item.
CheckBox:ComboBoxListItemCheckBox
(Optional) Represents a checkbox inside the list entry.
Icon:ComboBoxListItemIcon
(Optional) Represents an icon inside the list entry.
A ComboBox consists of a container element showing the current
selection and a list of the selectable items. In the example the div object
contains the list plus the ComboBox itself. Often the list is
defined somewhere completely different in the DOM. You can find it by opening
the list and checking the developer tool of the browser. Alternatively, you can get
the css classes of the list object and the list entries by recording a click
to a list item and checking the qfs:class entry of the 'Extra features'
table of the recorded components.
With this ComboBox we have several options for the mapping.
When you have contact to the developers of the application it is best to
ask them which attributes define a certain component class. If not,
you have to decide yourself which attributes best represent a certain
class. You should check this with other GUI objects of the same type.
Also you should check with similar GUI objects if they use the same
attributes. In this case maybe there is another, hopefully unique, attribute,
or you need to make it more specific by adding @::ancestor=....
In above example role=combobox should be precise enough for the ComboBox
itself, just as role=listbox or alternatively
class=listbox for the list. It probably will not make a greate
difference which one you choose. If normal lists had the same attribute you
could leave away the class type, i.e. you would just map
listbox=List and result=Item:ListItem@::ancestor=List.
It would not affect the functionality the combobox list within QF-Test.
However, class=result as well role=option, used for
the list items, could very well be used with other classes, too.
Therefore, we will add @::ancestor=List:ComboBoxList in any
case to be sure.
Nous utilisons des cookies "Matomo" pour l'évaluation anonyme de votre visite à note page web. Pour cela nous avons besoin de votre consentement qui est valable pour douze mois. La révocation est possbile n'importe quand sur notre page "Protection de données".
Configuration de cookies
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.
Name
_pk_ref
Provider
Matomo
Lifetime
6 months.
Type
HTTP
Description
This cookie is used to track from which website the anonymized user proceeded to any page or sub-page.
Name
_pk_ses
Provider
Matomo
Lifetime
1 day.
Type
HTTP
Description
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.
Name
_pk_testcookie
Provider
Matomo
Lifetime
Session.
Type
HTTP
Description
is created and should be then directly deleted (used to check whether the visitor’s browser supports cookies).
Name
_pk_cvar
Provider
Matomo
Lifetime
30 Min
Type
HTTP
Description
short lived cookies used to temporarily store data for the visit.
Name
_pk_hsr
Provider
Matomo
Lifetime
30 Min
Type
HTTP
Description
short lived cookies used to temporarily store data for the visit.