Possible Duplicate:
Selenium WebDriver - get options from hidden select
I'm having a big problem with select on one page.
Code:
<select name="fw3k_ad_input_et_type_group" class=""
id="_id_fw3k_ad_input_et_type_group"
onchange=" eurotax.change_type_group( this.value ); "
style="display: none; ">
<option value="0"> --- odaberite tip --- </option>
<option value="-1" class="special">> nema mog tipa </option>
<option value="16390">CD</option>
<option value="17605">S</option>
<option value="17636">SE</option>
</select>
<a href="" class="fs_item" id="fs_item_0" style=""> --- odaberite tip --- </a>
View:
http://imageshack.us/f/7/screenshotfrom201209111.png/
Select is hidden and a href="" is visible part that changes its text depending on a selected option.
I really dont know how to manage that. I can get all options with JavascriptExecutor and I can use a.click() to view dropdown box but I dont know how to click on some option.
I have tried to use Select class and .getOptions() method but it doesn't work with hidden select and I cannot change a href="" text.
:(
Please help me with some example.
A little confused with the question but have you you tried
Then use either
worked for me for something very similar.
1st way: it is not the problem to click any element using the same js. As you know how to get any option the last actions remaning is to perform a click. This should work for you:
2nd way:
3rd way: using actions builder, advanced user actions API. You can read about it here And code will be smth like that:
You can also some additional info here Hope this somehow helps you)