Ask a Question

The object I am trying to interact cannot be found

Ovi
New Contributor

The object I am trying to interact cannot be found

Hello,

 

I am using TestComplete to test a windows application that inside it has tabs and when I switch from one tab to another TC does not seem to either .Find() the object I want or even if I give it a exact name of the object cannot find it. I believe it is a problem of either remapping the objects or focusing on the right tab.

 

Thanks,
Ovidiu.

6 REPLIES 6
Marsha_R
Community Hero

Re: The object I am trying to interact cannot be found

Have you tried recording a test where you switch between the tabs?  That will let you see what TC thinks the tabs are called.  

Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
Ovi
New Contributor

Re: The object I am trying to interact cannot be found

Yes, I have tried to record a test case and use the names of the objects that are used in the recorded test but it still does not recognize the object.

Marsha_R
Community Hero

Re: The object I am trying to interact cannot be found

What happens if you play back the recorded test case?  Do you get error messages?  If so, could you post those here please?

 

Also give us a screenshot of the Extended properties of the tabs from Object Spy.

Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
Ovi
New Contributor

Re: The object I am trying to interact cannot be found

I am trying to avoid recorded test cases since the test PC resolution might change in the future. I receive the error that the object has not been found, although if I am in that tab when I run the test, the object is found. 

tristaanogre
Community Hero

Re: The object I am trying to interact cannot be found

Could be a timing issue where the test is attempting to interact with the object before it is fully rendered by the browser.  Try increasing your auto-wait timeout or use a WaitAliasChild call.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Marsha_R
Community Hero

Re: The object I am trying to interact cannot be found

Recording a test case is useful for research or debugging purposes.  No need to keep it for a test suite, but it will show you what TC is seeing for the objects and actions.  When we write keyword tests and scripts, we are all making assumptions as to what TC is doing and if the results are not what we expect, then recording is a good way to double check.

Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
cancel
Showing results for 
Search instead for 
Did you mean: