| || |
After trying all the suggestions given in this forum, I found that GetText/GetContents from this windows not possible.
So I request the forum members to please help me out in solving this issue, as it is very much affecting my test case automation.
What exactly is the issue? When controls record in SilkTest as these classes, it is usually a "customwin" 3rd party control. For example, on the app I am testing now, we have Stingray Objective Grid controls that show up as AfxFrameOrView70 and a custom tab control that shows up as an 'AfxWnd##'. These I believe are just generic low-level windows classes for basic controls and means Silk won't handle them natively. We had to use the Silk Extension Kit to interact with these controls. So you should find out from your developers what type of 3rd part controls these are and go from there.
You are seeing AfxFrameOrView class because the window is in fact a frame window, so it has the properties that MFC associates with a frame window. The "frame" window -- like a border you might see around other controls -- so I would not expect it to have text.
Not all text appearing on a window is text which is stored with that window. You'll never be able to get the kind of text which is merely painted
on the drawing surface, because whatever text was used to effect that painting is no longer 'text' .. it's now just a collection of pixel values.
Using WM_GETTEXT might work, but again AfxFrameOrView42 might be user-drawn so nothing is likely to work. (In a user-drawn window the "text" can actually be graphics, and therefore not readable.)
The WM_GETTEXT message works for windows that have text to be gotten. If there is not text to be gotten then a hook won't help.
Hi Brian and Pbc,
Thanks for the reply. Here is my scenario:
A client application is having option to see the reports of particular kind. When he clicks on the report button, a report window is displayed. SilkTest is identifying this report window as AfxFrameOrView421,AfxWnd42. My task is to verify this report with actual values. So I need to getcontents from this report including column and rownames.
I never used SilkTest Extension kit till now. Can you please explain me how it works? And how to get that?
After I get what type of 3rd part controls from developers, how can I go about this task?
Thanks a lot
before going the EK route, can you highlight the report text and copy to the clipboard. If so, you should then be able to retrieve the information from the clipboard.
Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.