Color recognition in web automation

Hi all,
Can anyone guide me in identifying the colors in web automation. Is there any specific component in UI Path to recognize color.

Thanks
Siva

Not as far as I know. Unless you can find the colour element in the HTMLā€¦

1 Like

Itā€™s worth mentioning that using Image activities you might be able to compare the image and thus react on it.

Also, if the element has a color property, you might be able to use Get Attribute.

Using selector, how can I get the color attribute by HTML? Is there any possibility ? Can anyone attach an sample workflow of identifying colors in web automation Plā€¦

Thanks

Hello,

I want my flow to detect color of a box and if color match with required color then it should return the text or name of the box.

Anyone please help me on this topic.

For example:
image

Like if color is red then flow should return its name ā€˜GLD_APU2ā€™.

Thanks in advance :slight_smile:

I try to help based on my experience

image

Hi all,

In the project Iā€™m working on, weā€™ve had the same problem. It was a bit more complicated because we were dealing with a Java applet and had no CSS selectors. Still, we were not able to get the ā€œBackground Colorā€ property from the element.

We solved the problem by using the ColorDetector extension altogether with the ā€œGet Positionā€ Activity. It takes the absolute X and Y coordinates on the screen (which is returned by the previous activity) and returns the a string with the color name. The screen needs to be maximized, though :slight_smile:

7 Likes

Would be able to share work flow. I am looking at a very similar problem.