1 Reply Latest reply on Oct 16, 2009 8:13 AM by Stan Silvert

    Ajax.Autocompleter seems not working in JSFUnit tet

    Sonya Ling Newbie

      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");
      client.setValue("newCategory", "pr");
      String previews ="previews";
      System.out.println("textContent= "+autoCompleteCategory.getTextContent());
      HtmlElement element = (HtmlElement) autoCompleteCategory.getByXPath(".//li[text()='"+previews+"']").get(0);//IndexOutofBoundException if I comment out the previous assert

      It works when I use real UI. The followings are copied from Firebug.
      <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;">
      <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>

      We use Ajax.Autocompleter provided by script.aculo.us controls.js.
      I noticed that autocomplete_choicesCat will close if I wait for a while without choosing the candidate. That should not be this case. I also added jboss-jsfunit-richfaces-1.1.0.GA.jar
      just in case.

      Let me know if I missed something or it is a known bug.