PDA

View Full Version : Anyone has experience using Watir to click on a SimpleComboBox?



mickyg
17 Jun 2010, 5:51 AM
It appears the HTML doesnt use SELECT/OPTION format -- i see divs instead and I cant select it. :(

Any help would be appreciated.

Thanks,
M



<div tabindex="-1" class="x-form-item">
<label class="x-form-item-label" style="width: 120px;" for="x-auto-689-input">Protocol:</label>
<div style="padding-left: 125px;" id="x-form-el-x-auto-689" class="x-form-element">
<div class="x-form-field-wrap x-component x-trigger-wrap-focus" id="x-auto-689" style="width: 221px;">
<input type="text" class="x-form-field x-form-text x-triggerfield-noedit x-form-focus" id="x-auto-689-input" tabindex="0" readonly="" autocomplete="off" style="width: 204px;">
<img class="x-form-trigger x-form-trigger-arrow " src="https://xxxxx:8443/UI/clear.gif" id="x-auto-690">
</div>
</div>
<div class="x-form-clear-left">
</div>
</div>

Cblouin
13 May 2014, 1:05 PM
My syntax might be a little different from yours but this is how i got my EXTJS combo selection to work:

@browser.text_field(:id,"companyComboBox-inputEl").set(company)
@browser.text_field(:id,"companyComboBox-inputEl").fire_event('onblur')
@browser.text_field(:id,"companyComboBox-inputEl").send_keys :tab

cat