Forum Discussion

BTscott's avatar
BTscott
Contributor
7 years ago
Solved

How to resolve recognition hint for when a button is clicked in a JDialog

Greetings!

 

I am trying to automate an action for clicking a button within one dialog which causes another dialog to open. However, when I run the test, I keep getting an 'object recognition hint' warning because the playback cannot find the target button after the button is clicked.

 

Please help.

 

Thank you,

 

Scott

  • OK. I resolved the issue by removing JavaClassName ('JDialog') as an identifier. This prevents TestComplete from confusing the two JDialogs.

     

    Thank you for your assistance. :)

6 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    A screenshot of the two dialogs and of the test code involved would be helpful.

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      Basically, here's what's happening... your NameMapping for the dialog box is not specific enough... it found a dialog with the JavaClassName of JSDialog... but you have probably multiple objects mapped that way in your NameMapping with nothing clear to distinguish between the two.  What you need to do is go back to your NameMapping and add additional properties to your mapped objects so that they are uniquely identified.

  • OK. I resolved the issue by removing JavaClassName ('JDialog') as an identifier. This prevents TestComplete from confusing the two JDialogs.

     

    Thank you for your assistance. :)