Validate text color

Ask general questions here.
Posts: 1
Joined: Thu Feb 20, 2020 5:03 pm

Validate text color

Post by weilksein » Thu Feb 20, 2020 5:04 pm

I have a table and there is a text with some color:

/row[@index='0']/cell[@content='<html><style>body {font: 11 Tahoma; color:#FF00FF}...

What is the best way to validate the text color?

Should I save the content to String and then search the "color:" and read the value?

Or is there some better ways to do this?

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

Re: Validate text color

Post by Support Team » Thu Feb 20, 2020 10:36 pm

Hi weiksein,

If you are able to provide a Ranorex Snapshot (not screenshot) of the element, we can provide the exact answer to validating this element's color. If there is no dedicated attribute that provides the color, then you can likely use a InvokeAction > GetStyle to get the color.

1.png (9.65 KiB) Viewed 383 times

I hope this helps!


Posts: 1
Joined: Tue Mar 10, 2020 1:57 pm

Re: Validate text color

Post by paul2233 » Tue Mar 10, 2020 2:09 pm

hii wilskein
the best way to validate text color is searching " colour:" if you find any better way please let us know