18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
Choose an item of a combobox
Hi,
How can I choose an item of a combobox? Because the instruction which catch Sahi is
_click(_div("x-combo-list-item x-combo-selected"));
and the element chosen is the first on the list. How can I do to choose another item?
Regards
How can I choose an item of a combobox? Because the instruction which catch Sahi is
_click(_div("x-combo-list-item x-combo-selected"));
and the element chosen is the first on the list. How can I do to choose another item?
Regards
Comments
Ej:
_setSelected(_select("Age"), "28");
_setSelected(_select("color"), 1); // Selects the second option in a select box
_setSelected(_select("color"), red); // Selects red in a multiselect box
_setSelected(_select("color"), blue, true); // Selects blue also in the multiselect box
I have a problem in the part _select("color")
because i am testing with some different options but it doesn't work
Can you give an idea of how can I put in that place?
Thanks
Note that the value of the combo you select must be the same as shown in the application.
is not the same the letter "a" to the letter "A"
for example if the combo has the word
"Colombia", because not put "colombia"
example:
_setSelected (_select ("Country"), "Colombia"); ok
_setSelected (_select ("Country"), "colombia"); Error
It was difficult to find out the control
Bye