Forum Discussion

YuraPetra's avatar
YuraPetra
Occasional Contributor
8 years ago

Can't find an object after record the test

Hello guys!

 

I have a test case, which I can't fix. It looks like a bug appears in the TestComplete, or maybe som eanother things happens which I don't know.

 

So, what we have. I have record a test case and after executing, I get an error, that unexpecter window appears. But there is not unexpecting window. Maybe you point me, what I'm doing wrong.

 

The part of the test case doing few actions:

1. Click on the object (this object is selected).

2. Click on 'Property' button. (A new property window opens).

3. Click in this window on the 'Ok' button. (Here is a probem).

 

On the third step, the TestComplete said me that unexpecting window appears, and test fails.

To fix the problem, I have found the line of code where it happens. Make a double click on this line of code. An 'On-Screen Object' window opens, where I push the 'Highlight' button to see 'OK' button in my aplication, but error window opens with information 'Cannot highlight this object on screen'. Then I push the aim button and drag it on the 'OK' button in my application. After that I push the 'highlight' button again, and this button marks with red square, which means that the TestComplete can see this button. After that I click the 'Finish' button to save the changes.

 After that I do right-click on the line of code, which should make a click on the 'OK' button, the menu opens where I select the 'highlight on screen' menu, but again an error message opens with information that this object cannot be highlighted.

 

 What here going wrong?

 

You can see the video attachment.

  • It seems I have found solution for my situation.

     

    Now I found the window by path 'Sys.Process('VISIO').Window('#32770', 'Person "CopyTo Parent"', 1)' ang get an focus. Then send the keys for this window. For OK button it should be '~o'.

  • shankar_r's avatar
    shankar_r
    Community Hero

    Hi,

     

    Most likely this could be your new window which may have dynamic property each time opens.

     

    Can you share the Object property snapshot of new property window which opens? 

    • YuraPetra's avatar
      YuraPetra
      Occasional Contributor

      Thanks for answer.

       Here is a screenshot of the Object Browser with selected OK button.

      • shankar_r's avatar
        shankar_r
        Community Hero

        Does your window object property changing each time when try to add?, if so edit the #32770 as * then try