Forum Discussion

WillyJenkins's avatar
WillyJenkins
New Contributor
7 years ago

Using a keyword test to select a value in a drop down in Chrome results in the middle value

I am using Test Complete to test the functionality of a web page which includes some data entry and selection of values from some drop down menus.  I am using the "On-Screen Action" to select the value in the drop downs but I am not getting what I expect. Instead of the value I want selected which is a variable being stored in a spreadsheet, it scrolls till the value I want is displayed then it selects the middle value currently being displayed in the drop down.  The web page is being tested through Chrome. 

7 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Could you post a screenshot of the keyword test steps that are executing this?  

     

    Typically, selecting a drop down is executed by the "ClickItem" method where you pass to that method either the string value of the item to be selected or the integer index of the item.  If you are using the ClickItem method, then there may be some difference between the drop down component you are using and how TestComplete typically works with such components.

     

    Please include, also, screenshots of the drop down control in the Object Browser displaying the full Advanced view of the properties of the object and the methods available.

    • WillyJenkins's avatar
      WillyJenkins
      New Contributor

       Robert,

       

      Here is the info you asked for to help flesh out the issue.  As you can see I am using the ClickItem method and pulling the value to be selected from a spreadsheet. Although I don't think it makes a difference, I am seeing this behavior with drop downs that contain text as well as drop downs that are integers.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Please provide a screen shot like this, both for properties and methods of the object in question.  

         

  • pgroeber's avatar
    pgroeber
    Senior Member

    We use TestComplete to test in Oracle and Oracle forms.  We deal with drop down lists a lot and I use Keyword scripting for all my testing.  To select a value in drop down lists I use 'Keys' as the Method or Property and then click on the three elicpes to open the Edit Parameter popup.  Mode = Constant; Type = String, and in Value: I type the value I want to select from the drop down list.  Hope this helps and good luck.