views:

16

answers:

0

Hi I am using JQuery's ajax autocomplete in my application. And mutliple field's are enabled with autocomplete within a single page ,also I want to cover all the autocomplete in a single test case. The problem am facing is the 1st autocomplete is working fine. For all other field the autocomplete list has come but mousueOver is not working.

Sample code :

testAutoComplete(){

    testEB0AutoComplete();
    testEB1AutoComplete();
    testEB2AutoComplete();

} //All these inner methods are pointing to a common set of codes i.e

            selenium.type(locator, value);
    selenium.typeKeys(locator, value);
    try {
        selenium.mouseOver("//html/body/ul/li/a");
        selenium.click("//html/body/ul/li/a");
    } catch (Exception e) {
        fail("Auto complete failed for "+locator);
    }

But If I write separate test cases for each auto complete, then its working fine. Could you please help me to find out where I went wrong?