Hello,
I have an application written in MFC. I'm trying to generate a test case validating communication
status by checking the back color of the button. The following is the code I'm running.
The winFormsButton returns as null. What am I missing?
Ranorex.Button button= "/form[@title='My App']/button[@text='Button1']";
Ranorex.Control winFormsButton = new Ranorex.Control(button);
Color temp = winFormsButton.GetPropertyValue<Color>("BackColor");
Will appreciate your support with that.
Thanks
Get Button Color
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Get Button Color
Hello,
Does your button has Control properties?
Could you please try to use the following method to get this property:
Markus (T)
Does your button has Control properties?
Could you please try to use the following method to get this property:
Report.Info("BackColor: " + button.Element.GetAttributeValueText("BackColor"));Regards,
Markus (T)