I just try to report a possible issue. We use Ajax.Autocompleter in some of JSF files. It failed the test because it does not fill up candidates list when I do
the followings:
HtmlDivision autoCompleteCategory = (HtmlDivision)client.getElement("autocomplete_choicesCat"); assertNotNull(autoCompleteCategory); client.setValue("newCategory", "pr"); String previews ="previews"; System.out.println("textContent= "+autoCompleteCategory.getTextContent()); assertTrue(autoCompleteCategory.getTextContent().contains(previews));//AssertError HtmlElement element = (HtmlElement) autoCompleteCategory.getByXPath(".//li[text()='"+previews+"']").get(0);//IndexOutofBoundException if I comment out the previous assert assertNotNull(element); element.click();
<input id="newCategory" type="text" size="30" name="newCategory" autocomplete="off"/> <div id="autocomplete_choicesCat" class="autocomplete" style="position: absolute; left: 294px; top: 1146px; width: 265px; opacity: 0.999999; display: none;"> <ul> <li id="93" class="">pregnancies</li> <li id="240" class="">project runway</li> <li id="262" class="">privacy</li> <li id="393" class="">previews</li> : </ul> </div>
So what is your output? What does the System.out.println say? What is the test output?
Stan