When I type a keyword ("Documents 1.xml")
driver.findElement(By.id("documentSelect_enter")).sendKeys("Documents 1.xml");
in this field:
<input id="documentSelect_enter" type="text" style="width: 300px" />
<img id="documentSelect_enterwait" src="/devstaging/img/ajax_process.gif" style="display: none" border="0" />
<div id="documentSelect_enteroptions" class="autocompleter"></div>
<script>
Event.observe($('documentSelect_enter'), 'keypress', function(event){ if(event.keyCode == Event.KEY_ENTER) return false; }, true);
function documentSelect_updateElement(li){
var id = li.readAttribute('id');
if (id != 'noresults'){
$('theForm:documentSelect_picker').value = id;
$('theForm:documentSelect_add').click();
$('documentSelect_enter').value = '';
return false;
}
}
function documentSelect_actionButton(){
if(false){
$('theForm:documentSelect_addAction').click();
}
}
document.documentSelect_multiPicker = new Ajax.Autocompleter('documentSelect_enter', 'documentSelect_enteroptions', "/devstaging/multiPickerResults?p=name&t=Document&subsetOf=&label=label", {paramName: "q", updateElement: documentSelect_updateElement, indicator: "documentSelect_enterwait"});
</script><input id="theForm:documentSelect_add" name="theForm:documentSelect_add" onclick="A4J.AJAX.Submit('_viewRoot','theForm',event,{'oncomplete':function(request,event,data){documentSelect_actionButton();},'parameters':{'theForm:documentSelect_add':'theForm:documentSelect_add'} ,'actionUrl':'/devstaging/pca/batch/add'} );return false;" style="display: none" type="button" /><input id="theForm:documentSelect_addAction" name="theForm:documentSelect_addAction" onclick="A4J.AJAX.Submit('_viewRoot','theForm',event,{'parameters':{'theForm:documentSelect_addAction':'theForm:documentSelect_addAction'} ,'actionUrl':'/devstaging/pca/batch/add'} );return false;" style="display: none" type="button" /><input id="theForm:documentSelect_picker" type="hidden" name="theForm:documentSelect_picker" /><span id="theForm:documentSelect_zone"><span id="theForm:documentSelect_noselections">
it returns a list of 4 items, from which I should select the top one. But I can't click on that top item with Selenium WebDriver. I use FireBug and it doesn't give me any hooks for it. When I try to hover over it with firebug "inspect", the list disappears or doesn't return any "hooks" (xpath, id, css etc). How do I make the WebDriver to select it?
