Color recognition in web automation


#1

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


#2

Not as far as I know. Unless you can find the colour element in the HTML…


#3

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.


#4

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


#5

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:


#6

I try to help based on my experience

image


#7

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: