xpath - Robot framework select variable from dropdown -


i trying select item dropdown list in robot framework (using ride), cannot item variable name.

<div class="chosen-drop">     <div class="chosen-search">         <input type="text" autocomplete="off">     </div>     <ul class="chosen-results">         <li class="active-result" data-option-array-index="0">geen optie gekozen</li>         <li class="active-result" data-option-array-index="2">abb</li>         <li class="active-result" data-option-array-index="3">algem</li>         <li class="active-result" data-option-array-index="4">aov</li>         <li class="active-result" data-option-array-index="5">aw</li>         <li class="active-result" data-option-array-index="8">aoz</li>     </ul> </div> 

i can use , result:

click element    xpath=//*[@id="keuze_n_middelid_n1010d_chosen"] click element    xpath=//*  [@id="keuze_n_middelid_n1010d_chosen"]/div/ul/li[4] 

but index number can change, want click element based on value, in example 'abb'. how can achieve this?

it similar so post not exact enough considered duplicate. based on achieved results think should work you.

[@id="keuze_n_middelid_n1010d_chosen"]/div/ul/li[text() = 'abb']


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -