Forum Discussion

maumrm's avatar
maumrm
Contributor
3 years ago

ObjectType Select - The drop-down box cannot be closed.

Test fails to select the item in the drop down menu and then states "The drop-down box cannot be closed" in chrome. Current version of TestComplete is Version: 15.43.1.7 x64. I am not sure if this is a timing issue or not, the test doesn't even try to select an ID. It opens the drop down and then fails.

 

Here are some of the playback setting:

Auto-wait timeout, ms: 10000

Delay between event, ms: 500

Key pressing delay, ms: 100

Dragging delay, ms: 5

Mouse movement delay, ms: 0

 

I have tried changing the mouse movement to 5 and still fails. 

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Is this a web application? How are you selecting the item? Can you provide your code and a screenshot of the UI control?

    • maumrm's avatar
      maumrm
      Contributor

      This is a web application. I am selecting the item via the operation of "ClickItem" within a keyword test. The object type is "Select". 

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    You might want to perform a Click, to expand the dropdown list, and then perform ClickItem to select the item.

     

    Certain UI controls behave slightly different, which TC won't be able to replicate. So it's necessary to understand how your UI control behaves and how to mimic this using TC.

     

    • maumrm's avatar
      maumrm
      Contributor

      I have tried to click on it then do the ClickItem, same failure occurs. 

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Also, make sure your mapped object doesn't have a default value assigned which TC is expecting. Otherwise TC will fail to find the object.

     

    For example, you recorded the object as ObjectType = Button and contentText = "Instruments". But during playback, contentText is changed to something else. TC will fail because it's looking for a UI object mapped as ObjectType = Button and contentText = "Instruments"