Page 1 of 1

Way to get the color property of Flex Element

Posted: Wed Dec 08, 2010 12:10 am
by rahul.bansal
Hello

I am trying to check the color property of a FlexElement and I am not sure how to do this. Is there a way to get the color property of an element. I have also tried to use Ranorex Spy to see if there is an explicit property (of the Element I am trying to work with) which deals with the color, but no help. Any ideas?

Thanks for the help

Re: Way to get the color property of Flex Element

Posted: Wed Dec 08, 2010 5:09 pm
by Support Team
Hi,

Please take a look to following post. Maybe the code sample in it solves your problem to get the color of your element. http://www.ranorex.com/forum/flexelemen ... t1734.html

Another solution would be to write the color to an property which is visible for Ranorex out of the box, for example description. Then you can use the RxPath to get the color of your element.

Regards,
Peter
Ranorex Team

Re: Way to get the color property of Flex Element

Posted: Thu Dec 09, 2010 11:11 pm
by rahul.bansal
Thanks for the reply Peter, the post was helpful. I had another question about the color property which I wasn't able to get an answer for from the previous post.
In my application, I have a LinkButton which I am converting into a FlexElement using the repository path. What I would like to do is get the color of the font and check this value against my desired value. When I do GetStyle("color") on this button, I do not get the right color value. I have tried doing GetStyle("font-color")/ GetStyle("fontcolor") but no help. Could you tell me if there is a way to get the proper font color of a FlexElement? Does GetStyle("color") work differently on LinkButton Flex Elements?

Thanks

Re: Way to get the color property of Flex Element

Posted: Fri Dec 10, 2010 1:19 pm
by Support Team
Hi,

the GetStyle method provided by Ranorex directly accesses the Flex object. So it should be possible to get all style elements provided by the Flex element thru this method.
So please find out how exactly the property you want to get can be accessed.

Kind regards,
Tobias
Support Team