Getting value of the Window object
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Getting value of the Window object
Hi,
I have an object like Sys.Process("config").Window("*").Window("Afx:StatusBar:aa0000:8:10003:10", "", 1);
Now this object has some data shown on the status bar such as 'number of items' :0 Users: 9 etc.
How can I get the values of the number of items out of this object.
The spy tool doesn't show any info. on the number of those captions/text. Is there any method that can be used to extract the text.
Thank you.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you add the WndClass property name of you status bar object to MSAA (Project Settings -> Properties -> Open Applications -> MSAA), you should then be able to get more information
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks @rraghvani I added the WndClass in the MSAA and it showed some captian details but not for all. Also, the text object was still not there as shown in your screenshot. The application I am testing is written in C++ and Sys.Process("config").Window("*").Window("Afx:StatusBar:aa0000:8:10003:10", "", 1) is a bottom statusbar that contains some caption/text such as 'Start' on the left side and 'Users:90' on the right side.
I read the documentation but was unable to get the User count 90. However, I could see 'Ready' in spytool properties that's not something I need for my test at the moment.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the Object Browser is not showing different sections of the status bar, then it could be a custom control. You might also need to add additional properties to MSAA.
Enable this,
Do you get more objects being exposed?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Enabling * also didn't work, but I enabled Win32 Controls in Object Mapping and now getting some additional properties name, but it shows error and no values.
MSVC Class is: CStatusBar
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's a small MFC application with "automation" enabled, which TC is able to identify the status bar
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will look into it again. Do you think it could be something related to text recognition plugin or adding any property in text recognition page in Properties? I'm not sure if I can get that if it's not our paid package.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like something with MFC Debug Info.
Can this approach be used with any Open Application like any desktop app that we don't develop ourselves and purchased it to handle some of our software tasks?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the link you have provided, it states "To automate MFC controls in Visual C++ applications, you need to compile your tested application with debug information."
You can get the OS symbol files for Windows, but this is different from the application that you are using. The application that you are using may not contain pdb files, if it's a release. If it's open source, then you can compile and generate the pdb files.
