Ranorex - BackColor attribute

Ask general questions here.
irem
Posts: 11
Joined: Fri May 25, 2012 12:40 pm

Ranorex - BackColor attribute

Post by irem » Mon Jul 09, 2012 12:25 pm

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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Ranorex - BackColor attribute

Post by Support Team » Tue Jul 10, 2012 12:20 pm

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

bsing
Posts: 81
Joined: Tue Feb 07, 2012 5:25 am

Re: Ranorex - BackColor attribute

Post by bsing » Wed Aug 22, 2012 5:11 am

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.