cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to use TextObject method on TreeView object for desktop application developed in C#

SOLVED
Highlighted
New Contributor

Unable to use TextObject method on TreeView object for desktop application developed in C#

Hi All,

I am facing issue in using the TextObject method on TreeView object.

The application is migrated from VB6 to C#. In VB6 version of the application I TextObject method is returning the object based on the associated text but the same method is unable find the object in C#.

 

Is there any specific reason for the same?

Is there any specific configuration required?

 

Regards,

ABPasha

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Re: Unable to use TextObject method on TreeView object for desktop application developed in C#

@abpasha did you find the solution? It seems like none of the suggested approaches helped. This means that a deeper investigation is required. The best next step is raising a Support Ticket.

Please post the solution here when you have one! Thank you!


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

6 REPLIES 6
Highlighted
Community Hero

Re: Unable to use TextObject method on TreeView object for desktop application developed in C#

Hi,

 

As it is specified in the documentation, .TextObject() method requires text to be drawn by the window procedure when it processes the WM_PAINT or WM_PRINTCLIENT message or by functions of the Direct2D library.

I think that this is how VB6 works but C# uses some other technique to render the text on the screen.

 

Considering that .Net applications are open to TestComplete by default, I would suggest to start from the investigation of the given TreeView object in the Object Browser and look for the properties/methods that can be used to identify and access the data you are looking for.

If you fail with the above, you should ask developers for their recommendation for how the data can be found (what native methods of TreeView should be used).

 

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

Re: Unable to use TextObject method on TreeView object for desktop application developed in C#

Hi,

 

Also check if you have correctly set TextRecognition for this particular class to ON.

 

It's in Tools -> Current Project Properties -> Open Applications -> Test Recognition

Highlighted
New Contributor

Re: Unable to use TextObject method on TreeView object for desktop application developed in C#

Thanks Alex for quick response. Will check and get back to you.

 

Regards,

ABu

Highlighted
New Contributor

Re: Unable to use TextObject method on TreeView object for desktop application developed in C#

Yes, the option is enabled, still getting that error.

Highlighted
Community Manager

Re: Unable to use TextObject method on TreeView object for desktop application developed in C#

Thanks Wamboo and Alex! 

 

@abpasha did you manage to solve this? Please share your progress with us!


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Community Manager

Re: Unable to use TextObject method on TreeView object for desktop application developed in C#

@abpasha did you find the solution? It seems like none of the suggested approaches helped. This means that a deeper investigation is required. The best next step is raising a Support Ticket.

Please post the solution here when you have one! Thank you!


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

New Here?
Join us and watch the welcome video:
Top Kudoed Authors