Ask a Question

Able to find objects, but not use them!

smcmickle
Contributor

Able to find objects, but not use them!


Hello again!



Here is my issue:: I can find objects in the object browser, I can highlight the objects via Name Mapping, but when running the script, the objects are coming up not found! 



I can literally record a script test, then attempt to replay it, yet I get errors stating something like::



"Unable to find the object ClickItem("Admin"). See Additional Information for details."



Thanks for the help!



-Sean




 

I’m not a member of the SmartBear Support Team, I’m just helping users in this community. Any views or opinions expressed do not necessarily represent those of SmartBear Software.
7 REPLIES 7
sastowe
Super Contributor

In the opbject browser, look up the tree a bit. Look for any case in which the object(s) that contain your children objects might have the same name in the same node of the tree. If that is the case, you need to use some mechanism for identifying WHICH of the objects with the same name contains the object you want. I use name mapping with extra seach. I forget the name of the property. You can also look at the various Find methods.
smcmickle
Contributor

Thanks Stephanie for the reply, I shall go ahead and try that. I will get back soon!
I’m not a member of the SmartBear Support Team, I’m just helping users in this community. Any views or opinions expressed do not necessarily represent those of SmartBear Software.
smcmickle
Contributor

Doesn't appear as if that is the issue. I don't have any parents of the same name. I can go to the object browser and right click the child node and click "highlight on screen" and it will say the object is not visible, despite when I use the object spy, that is the object it had JUST found... 



Hmmm.....
I’m not a member of the SmartBear Support Team, I’m just helping users in this community. Any views or opinions expressed do not necessarily represent those of SmartBear Software.
smcmickle
Contributor

Here was the solution::



Tools:: Current Project Properties:: Object Mapping:: Switch all the items that you are using to Derived Classes.



This was due to us using custom objects. We would make TreeTables as opposed to tables or trees.
I’m not a member of the SmartBear Support Team, I’m just helping users in this community. Any views or opinions expressed do not necessarily represent those of SmartBear Software.
smcmickle
Contributor

Seems this caused something that worked before to no longer work! Hmmm..... At first buttons didn't work and tabs worked, now it is the reverse.
I’m not a member of the SmartBear Support Team, I’m just helping users in this community. Any views or opinions expressed do not necessarily represent those of SmartBear Software.
TanyaYatskovska
SmartBear Alumni (Retired)


Hi Sean,


 


Saving a snapshot of the tested object when executing the tests may help you sort the things out. Look at the "SaveObjectSnapshotToFile Method" article.


 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



smcmickle
Contributor

Ended up reinstalling TC, using my co-workers settings. Finally ended up working!! I am so happy!! I can finally start to get some awesome automated testing going! Thanks everyone for helping! 🙂
I’m not a member of the SmartBear Support Team, I’m just helping users in this community. Any views or opinions expressed do not necessarily represent those of SmartBear Software.
cancel
Showing results for 
Search instead for 
Did you mean: