Hi Team ,
I am working on a MFC application and trying to identify a button on the header , which i am not able to .When i track it through spy it is identifying as complete toolbar instead of single button ,
I have tried adding GDi capture list as well but still i am not able to , Can you please help me with this ?
How to identify MFC application buttons
-
- Posts: 32
- Joined: Thu Sep 20, 2018 7:43 am
How to identify MFC application buttons
You do not have the required permissions to view the files attached to this post.
Re: How to identify MFC application buttons
Hi,
It's hard to suggest something reliable, without seeing the app under test (AUT) or at very least Ranorex snapshot (which I think would be useless this time). Sadly, if GDI capture list does not return rawtexts for individual buttons, there is probably not much else you can try. Your only hope is screenshot-based automation, which is unfortunately not very reliable in a long-term run. Another possibility is a proper implementation of MSAA, which must be done by the AUT developers.
It's hard to suggest something reliable, without seeing the app under test (AUT) or at very least Ranorex snapshot (which I think would be useless this time). Sadly, if GDI capture list does not return rawtexts for individual buttons, there is probably not much else you can try. Your only hope is screenshot-based automation, which is unfortunately not very reliable in a long-term run. Another possibility is a proper implementation of MSAA, which must be done by the AUT developers.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: How to identify MFC application buttons
I have a similar controls in our Windows desktop MFC application. Individual text items appear in the control and I simply must use GDICapture for exactly this circumstance. The rawtext elements are absolutely critical to my being able to automate these individual controls which feature a decent bit of text.
However, we also have icon buttons in some places, and these are toggleable. To control these I've had to resort to finding the control by image comparison. I saved a compact bitmap image of the control and search for that to find an area I can click on to toggle state. It's not great, I know, but it's worked well here for the past 2y or so through Ranorex v6, v7 and now v8.
However, we also have icon buttons in some places, and these are toggleable. To control these I've had to resort to finding the control by image comparison. I saved a compact bitmap image of the control and search for that to find an area I can click on to toggle state. It's not great, I know, but it's worked well here for the past 2y or so through Ranorex v6, v7 and now v8.
-
- Posts: 32
- Joined: Thu Sep 20, 2018 7:43 am
Re: How to identify MFC application buttons
Hi ,
Thank you for the reply , Please find the atatched snapshot of my application , Can you check and help me if i can do from my end aprt from screen shot based automation
Thank you for the reply , Please find the atatched snapshot of my application , Can you check and help me if i can do from my end aprt from screen shot based automation
odklizec wrote: ↑Thu Sep 20, 2018 11:39 amHi,
It's hard to suggest something reliable, without seeing the app under test (AUT) or at very least Ranorex snapshot (which I think would be useless this time). Sadly, if GDI capture list does not return rawtexts for individual buttons, there is probably not much else you can try. Your only hope is screenshot-based automation, which is unfortunately not very reliable in a long-term run. Another possibility is a proper implementation of MSAA, which must be done by the AUT developers.
-
- Posts: 32
- Joined: Thu Sep 20, 2018 7:43 am
Re: How to identify MFC application buttons
Thank you for the reply ,
Can you please share any blogs or link which i can go through for bitmap image based automation
Can you please share any blogs or link which i can go through for bitmap image based automation
Stub wrote: ↑Thu Sep 20, 2018 2:21 pmI have a similar controls in our Windows desktop MFC application. Individual text items appear in the control and I simply must use GDICapture for exactly this circumstance. The rawtext elements are absolutely critical to my being able to automate these individual controls which feature a decent bit of text.
However, we also have icon buttons in some places, and these are toggleable. To control these I've had to resort to finding the control by image comparison. I saved a compact bitmap image of the control and search for that to find an area I can click on to toggle state. It's not great, I know, but it's worked well here for the past 2y or so through Ranorex v6, v7 and now v8.
Re: How to identify MFC application buttons
I'm afraid, there seems to be no snapshot attached to your post. But to be quite honest, I doubt the snapshot will be useful in this particular case. And if adding parent control (or entire form) to GDI capture did not help with extracting RAW texts, there is most probably nothing you can do, except using screenshot-based automation. Definitely nothing without the help of app developers and implementing proper accessibility support.mohan.pentyala wrote: ↑Thu Sep 20, 2018 2:43 pmHi ,
Thank you for the reply , Please find the atatched snapshot of my application , Can you check and help me if i can do from my end aprt from screen shot based automation
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Posts: 32
- Joined: Thu Sep 20, 2018 7:43 am
Re: How to identify MFC application buttons
HI ,
Yes as you said i was discussing with my Team , to make sure I am attaching my snapshot as well . Can you please have a look and help me if we can do anything else .
Sure attached the snapshot this time
Yes as you said i was discussing with my Team , to make sure I am attaching my snapshot as well . Can you please have a look and help me if we can do anything else .
Sure attached the snapshot this time

You do not have the required permissions to view the files attached to this post.
Re: How to identify MFC application buttons
Hi,
At first, there is issued a technology limitation warning in the snapshot you posted. Which means the Ranorex element identification capabilities are limited for your app. So you should fix this problem first. Follow the steps mentioned here:
https://www.ranorex.com/help/latest/int ... plications
BTW, have you tried to run both Ranorex Studio/Spy as Administrator?
At second, after the above problem is cleared (and Ranorex is still not able to extract buttons from toolbar), try to add the parent form to GDI capture list... Then refresh the Spy and see, if there are any raw texts available in the UI tree. These should help you with identification of the toolbar buttons (texts). If there are no raw texts, then I'm afraid, screenshot-based automation is your only hope. Either this, or the application developers must properly implement msaa.
At first, there is issued a technology limitation warning in the snapshot you posted. Which means the Ranorex element identification capabilities are limited for your app. So you should fix this problem first. Follow the steps mentioned here:
https://www.ranorex.com/help/latest/int ... plications
BTW, have you tried to run both Ranorex Studio/Spy as Administrator?
At second, after the above problem is cleared (and Ranorex is still not able to extract buttons from toolbar), try to add the parent form to GDI capture list... Then refresh the Spy and see, if there are any raw texts available in the UI tree. These should help you with identification of the toolbar buttons (texts). If there are no raw texts, then I'm afraid, screenshot-based automation is your only hope. Either this, or the application developers must properly implement msaa.
You do not have the required permissions to view the files attached to this post.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Posts: 32
- Joined: Thu Sep 20, 2018 7:43 am
Re: How to identify MFC application buttons
Hi ,
Thanks for the help .Though i added to GDI capture list still i didn't see any raw text for the buttons .i will discuss with developer to place proper ID for the same.
Thanks for the help .Though i added to GDI capture list still i didn't see any raw text for the buttons .i will discuss with developer to place proper ID for the same.