Page 1 of 1

Ranorex - BackColor attribute

Posted: Mon Jul 09, 2012 12:25 pm
by irem
Hello,

I would like to get radio button's BackColor attribute. I don't know it's usage clearly.

I tried by this way :

Code: Select all

Color color = radioButton.As<Ranorex.Control>().GetPropertyValue<Color>("BackColor");


But this error occurs : Object reference not set to an instance of an object.

What can I do ?

Thanks in advance.

Re: Ranorex - BackColor attribute

Posted: Tue Jul 10, 2012 12:20 pm
by Support Team
As mentioned in our user guide,
...The Control adapter, which is available for .NET WinForms applications, allows Ranorex to access more properties in the application under test, like the background color or font size of the displayed text...
That means, it depends on the technology, your applciation under test is based on, how much inforamtion you will get out of your controlls.

So, can you please tell send us a snapshot file of your application under test to allow us analyze the mentioned problem.
Following chapter of our user guide will explain how to generate a snapshot file:
Creating Ranorex Snapshot Files

Thanks in advance.

Regards,
Tobias
Ranorex Team

Re: Ranorex - BackColor attribute

Posted: Wed Aug 22, 2012 5:11 am
by bsing
I had the same problem with a text box. Check your RanorexPath ... my path was .....text[@controlname='blah']/text[@accessiblename='blah']";

In order to get it working I had to remove the last text element using accessible name attribute.

Hope this helps.