Unable to use TextObject method on TreeView object for desktop application developed in C#
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
/Alex [Community Champion]
____
[Community Champions] 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 Champions]
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 Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Alex for quick response. Will check and get back to you.
Regards,
ABu
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, the option is enabled, still getting that error.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Wamboo and Alex!
@abpasha did you manage to solve this? Please share your progress with us!
Sonya Mihaljova
Community and Education Specialist
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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
