Topic
1 reply Latest Post - ‏2012-11-30T14:42:00Z by SystemAdmin
newbie_tiwari
newbie_tiwari
12 Posts
ACCEPTED ANSWER

Pinned topic How to select any option from Dropdown

‏2012-11-26T09:29:14Z |
In a attached screenshot, m not able to select an option- "TOM'S TEST COMPANY at 100 MAIN in OVERLAND PARK, KS 66211"

I tried by using
list_claimantParty().click();
list_claimantParty().click(atText("TOM'S TEST COMPANY at 100 MAIN in OVERLAND PARK, KS 66211"));


but its not woring and script is getting stopped, but for all other dropdowns present on other webpages m using same code and is working.

even i tried using this code also but still m not able to select a mentioned option
list_claimantParty().waitForExistence(30, 2);
                                java.util.Hashtable ht = list_claimantParty().getTestDataTypes();
                                
                                System.out.println(ht);
                                nameList = (ITestDataList)list_claimantParty().getTestData("list");
                                
                                nameListElements = nameList.getElements();
                                System.out.println((ITestDataList)list_claimantParty().getTestData("list"));
                                int listElemCount = nameList.getElementCount();
                                System.out.println(nameList.getElementCount());
 
                                for (int i = 0; i < listElemCount; i++)
                                {
                                nameListElement = nameListElements.getElement(i);
                                System.out.println(nameListElement.getElement());


Friends I am new to coding aswell so could you pls help me.
Updated on 2014-03-25T12:58:13Z at 2014-03-25T12:58:13Z by iron-man
  • SystemAdmin
    SystemAdmin
    16727 Posts
    ACCEPTED ANSWER

    Re: How to select any option from Dropdown

    ‏2012-11-30T14:42:00Z  in response to newbie_tiwari
    Can you select shorter options? What about clicking the combo first, inputting "TOM" afterwards? Perhaps it is due to ' character in the option.