cancel
Showing results for 
Search instead for 
Did you mean: 

How to work when Object Spy doesn't find object

SOLVED
Highlighted
Occasional Contributor

How to work when Object Spy doesn't find object

Hi

 

Just starting out with TC. I'm a little unsure what the best practice is when I can't find the element with object spy. I have multiple items that I currently can't find. So what is the best practice/most reliable way to identify these?

 

object.PNG

 

I'm looking to find some of these icons, but unsure how to proceed in general. I also have a similar problem with the view meno tab at the top. This adds other tabs the deeper into the application you go. But object spy returns to whole tab area, and I can't select a given tab

 

Thanks

 

Jonathon

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Leader

Re: How to work when Object Spy doesn't find object

Hi,

 

Theres a multiple solutions to be able to spay these object from screen:

 

1) Working with application in debug mode. Check below topic for more information:

https://community.smartbear.com/t5/TestComplete-Desktop-Testing/Support-for-custom-objects/td-p/1904...

 

2) Use Text Recognition Technology in TestComplete:

https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/text-recognition/...

 

3) Remeber that in project properties You have a list of currently supported objects, try to add custom classes into this directory.

objects-01.png

 

4) You can also use Image Repository to interact with objects on screen.

https://support.smartbear.com/testcomplete/docs/reference/project-objects/items/image-repository/ind...

View solution in original post

3 REPLIES 3
Highlighted
Occasional Contributor

Re: How to work when Object Spy doesn't find object

The easiest way to do it is to record clicks (using record test functionality) and check how Testcomplete mapped these actions. Your case is a bit complicated, because you want to find specific element on ribbon (for reference you can read this section of reference manual: https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/desktop/wpf/ribbon/ Check Properties and Methods links too). To select element on ribbon, you basically invoke method like ClickItem or ClickItemXY on ribbon object and  you pass the name of element (e.g "ribbon|dept") as an argument. Like I said, the easiest way to know this name, is to record click on item in ribbon and see how Testcomplete will name it.

As of the second part (View Menu) I can only advice the same approach. 

Highlighted
Community Hero

Re: How to work when Object Spy doesn't find object

As mentioned, try recording to "learn" your application a bit and how TestComplete interacts with it.

 

For your example, that's a ribbon or menu control in which the icons themselves are not individual objects but are interacted with via a "ClickItem" or "ClickMenu" or some other method.  Again, try a quick record to get an idea of what this looks like and then make your modifciations accordingly.


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
Highlighted
Community Leader

Re: How to work when Object Spy doesn't find object

Hi,

 

Theres a multiple solutions to be able to spay these object from screen:

 

1) Working with application in debug mode. Check below topic for more information:

https://community.smartbear.com/t5/TestComplete-Desktop-Testing/Support-for-custom-objects/td-p/1904...

 

2) Use Text Recognition Technology in TestComplete:

https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/text-recognition/...

 

3) Remeber that in project properties You have a list of currently supported objects, try to add custom classes into this directory.

objects-01.png

 

4) You can also use Image Repository to interact with objects on screen.

https://support.smartbear.com/testcomplete/docs/reference/project-objects/items/image-repository/ind...

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!