Forum Discussion

joe_brooks's avatar
10 months ago

Issues with dropdowns and ClickItem() not working if the dropdown opens in the up direction

We have been using TestComplete since version 14.93, and all versions of TestComplete, up to and including the latest versions (15.50 and 15.51) have had this same issue:

We are doing Web testing and record our tests with Chrome. If a test is recorded and there is a dropdown list and ClickItem() is used to access an item on the dropdown list, and the test is played back on the same machine that recorded the test, everything works fine. But if a user has a different screen resolution or browser zoom level than the person who recorded the test, we can wind up with a situation where the dropdown opens differently for those two users. Examples:

User 1:

User 2:

The dropdown for User 2 opens in the upward direction because it is too close to the bottom of the screen for the dropdown list to display in its entirety in the downward direction. This can be impacted even by the position on the page where the user has scrolled to, even if the resolution and browser zoom levels are identical.

What we've found is that if the dropdown opens in one direction (usually but not always the down direction) when a test is recorded, when the test is played back and the dropdown list opens in the other direction (usually up, in this case), the test will open the dropdown list and hang there. The ClickItem() step will then time out and fail with an error message that says, "The drop-down box cannot be opened."

When this happens, our workaround is to change the test from using the ClickItem() method to using the Keys method with the full text of the item in the dropdown list to be selected. This circumvents what appears to be a bug in ClickItem() that has been there for a long time, but it is a pain for us to have to go back and change this every time we run into an instance of this issue.

Has anyone else experienced something similar to this?

Edit: Because of the Chrome 113 issue, we've started playing our tests back in Edge, and we're noticing that ClickItem() steps that work in Chrome do not work in Edge, even if the dropdown list opens in the same direction as it does in Chrome. The ClickItem() steps fail with the same error message noted above: "The drop-down box cannot be opened." Resorting to using the Keys method still works as a workaround in Edge. This seems to be happening for every drop-down box when the tests are run in Edge.

13 Replies

  • VSC's avatar
    Occasional Contributor

    We have the same problem. After we updatetd TestComplete to version our dropdowns doesn't work. 

  • warrenw39's avatar
    Occasional Contributor

    I have encountered a similar issue after the latest patch was downloaded. An existing test stopped selecting the correct drop list item and was failing. Upon attempting to rectify I was unable select the drop list item using the Select Object tool or Object Spy. They simply refused to highlight the required drop list items. The previously recorded objects are visible in the Object browser and correctly identified.  Test playback fails to select the correct object. 

    • juliemorris's avatar
      Occasional Contributor

      Hi, is there a fix for ClickItem yet? This function still fails. I am updating all of the tests to use .Keys, but it is frustrating.



      • joe_brooks's avatar

        juliemorris No, the ClickItem() issue that I reported has not been fixed yet. However, I did finally receive confirmation from SmartBear's Customer Care that SmartBear understands the issue that we're experiencing and that it has been forwarded to their developers. My support ticket has progressed to the status of "Researching" as of July 27th, 2023. Customer Care is supposed to reach out to me as soon as they have an update on the issue.

        As of right now, the best version of TestComplete with regard to how ClickItem functions is still 15.51.30, and we are still on that version. 

        There have been two subsequent updates to TestComplete, 15.52.2 and 15.53.2. Both use very odd and slow implementations of the ClickItem() method. ClickItem test steps take an average of 3x longer to execute in 15.53, and 15.52 is even slower. This is a big issue for us as our tests have lots of ClickItem steps.

        Neither 15.52.2 nor 15.53.2 has any impact on the ClickItem() issue described in this post, nor do they seem to provide any other benefits, so we will remain on 15.51.30 until both this issue and the performance / behavior issues introduced in 15.52.2 and 15.53.2 are resolved.

  • Marsha_R's avatar
    Champion Level 3

    I usually handled dropdown lists by finding a property that I could use to select the item rather than counting on where the item is going to be on the screen, which you can see isn't always the same. 


    If you drill down on the dropdown list with Object Spy, see if you can find the actual item list and address the items that way. 

    • joe_brooks's avatar

      Thanks for the reply, Marsha, but we are using the object and not using any positional clicking to select items. This is an example of a test step that fails with this issue:

      The test finds the selectSourceType object just fine, but it cannot click the item in the drop-down box as described above. TestComplete seems to believe that the drop-down box is not open, although you can clearly see that it is open in the browser, just in the upward direction and not the downward direction.

      We know for a fact that it is finding the object just fine, because if we put this test step in the exact same place,

      which uses Keys() instead of ClickItem() with the same object, the Keys() step works just fine.

      This would seem to be a bug in TestComplete's handling of the ClickItem() method for drop-down box objects.

  • We are doing scripting for web application on TestComplete 14.93.312.7, we are unable to use ClickItem() of dropdown fields. It had been working till 1st Qtr of 2023, I guess some windows patch broke it.


    IS there any chance to get that issue fixed? 

    • joe_brooks's avatar

      I assume you mean that you are using v14.93, not v4.93.


      I have been working with SmartBear on a support case for this issue (actually several ClickItem issues), and they have indicated that they are working on a fix for the issue. When they do issue a fix for this issue, it will be in version 15, probably v15.59 or later, so you will have to upgrade to v15 to access the fix.

  • rraghvani's avatar
    Champion Level 3

    You're using TestComplete 4.93.312.7, version 4!? I'm assuming you're using v14?