Ask a Question

continuously getting 'Object cannot be found or 'object has been deleted'

SOLVED
mdragani
Occasional Contributor

continuously getting 'Object cannot be found or 'object has been deleted'

Totally new using TestComplete. Using Keyword tests with simple cases. Running the test  individual test cases work one minute and then the next I get 'Object cannot be found' or 'Object has been deleted'.  I found the information on setting the wait time to a longer period but that isn't working either.  I am using Chrome and configured it according to the quide lines.  Any ideas what else can try. Basically the keyword tests will work and then they stop working

11 REPLIES 11
rraghvani
Valued Contributor

This is a web application running in Chrome? What version of Chrome are you using? What is your keyword test doing or what keyword test is causing "Object cannot be found"?

mdragani
Occasional Contributor

Yes it is Chrome. (sorry). When i went into Help|About to check it actually did an update to Version 109.0.5414.119 (Official Build) (64-bit). I know SmartBear recommends not doing automatic updates but had no choose. 

 

I have several keyword tests. One is a simple login in to the our web product which validates with a check the page it is in.  Another is adding a user to our application.  Another is testing an invalid password then another invalid username.  The confusing thing is the keyword tests work and then for some reason when running another time it can't find the object (which is a number of different objects like a page, a click, url etc.  see below two examples below

mdragani_0-1674664451934.png

 

Unable to navigate to the http://localhost/corretrak page. 8:52:29 41.34

 

rraghvani
Valued Contributor

Are you running the web application on your local machine? I'm wondering whether the cached object that TC relies on, has been updated or deleted. See Refresh Name Mapping Cache. Calling method TestObj.Refresh() before each step might resolve the issue, but it's not ideal. Also, check that the parent object still remains the same.

 

What version of TC are you using?

 

mdragani
Occasional Contributor

I am running the latest version Version: 15.48.1.7 x64. And yes i am running the web application on my laptop.  Like i said it is happening for multiple objects ie.  The object "BrowserWindow" does not exist. 10:33:44 0.00. i will take a look at the Refresh Name Mapping Cache and see if that helps me at all.  Thank you

 

mdragani
Occasional Contributor

So i just realized i had already looked at the Refresh Name Mapping Cache but i am not positive how to incorporate it into a Keyword Test as it displays an example when using a script in the document

You can run a script from a keyword test like this:

https://support.smartbear.com/testcomplete/docs/keyword-testing/reference/test-actions/run-script-ro...

 

Here's the method

https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-all/refres...

 


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
mdragani
Occasional Contributor

Thank you so much Marsha. I will give it a try tomorrow when i start working again.

rraghvani
Valued Contributor

AlexKaras
Community Hero

Also, https://support.smartbear.com/testcomplete/docs/testing-with/running/handling-errors/object-not-foun... might help...

 

Regards,
  /Alex [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: