Hi,
I can't seem to figure out how can I get TS so select a value from a combobox.
I've tried to record clicking on the combobox button to open it and then clicking on a value, but this does not execute properly.
After searching on the forum and found this thread (http://www.telerik.com/forums/how-to-select-from-drop-down-list) I also tried the following code, but this also doesn't work.
// Enter text 'Audi' in 'Text'
Pages.LusitaniaSimuladorMotore26.Span.Click();
HtmlSelect marca = ActiveBrowser.Find.ById<HtmlSelect>(
"marcas"
);
marca.SelectByValue(
"Audi"
);
With the above code I can see that the combobox opens, but no value is selected.
The HTML of the page is
<
div
id
=
"marcas_id_div"
><
select
id
=
"marcas"
onchange
=
"javascript:ResetTotais(); ResetVersao(); ResetVeiculoInfo(); GetVersoes(false); CarregarVariaveis(0, 0, this.name);"
name
=
"marcas"
style
=
"width: 270px; display: none;"
><
option
value
=
""
> </
option
><
option
value
=
"Abarth"
>Abarth </
option
><
option
value
=
"Alfa Romeo"
>Alfa Romeo </
option
><
option
value
=
"Aston Martin"
>Aston Martin </
option
><
option
value
=
"Audi"
>Audi </
option
><
option
value
=
"Bentley"
>Bentley </
option
><
option
value
=
"Bmw"
>Bmw </
option
><
option
value
=
"Chevrolet"
>Chevrolet </
option
></
select
><
span
class
=
"ui-combobox"
><
input
class
=
"ui-state-default ui-combobox-input ui-autocomplete-input ui-widget ui-widget-content ui-corner-left"
style
=
"padding: 0 5px; height: 22px;"
autocomplete
=
"off"
role
=
"textbox"
aria-autocomplete
=
"list"
aria-haspopup
=
"true"
><
a
class
=
"ui-button ui-widget ui-state-default ui-button-icon-only ui-corner-right ui-combobox-toggle"
tabindex
=
"-1"
title
=
"Mostrar Todos Os Itens"
role
=
"button"
aria-disabled
=
"false"
style
=
""
><
span
class
=
"ui-button-icon-primary ui-icon ui-icon-triangle-1-s"
></
span
><
span
class
=
"ui-button-text"
></
span
></
a
></
span
></
div
>
Please help me.
Thanks,
Luis