TestProject Forum
Powered by leading experts in the test automation community

Get the color at specific coordinate on screen?

Is it possible to get the specific color (pixel) from any location/coordinates on the screen (without using webelemets type)?

As a tester, I need to check the pixel color from the coordinates (x,y) and wait for it to appear on the screen next time in order to proceed the test.

Thanks

Hello @usmanteepu
In web, everything is an part of an element, even that pixel.
You can press F12 to open chrome developer tools or inside the recorder use the element explorer to find the element which should hold the pixel that holds the color you want to validate.
Then use the Get CSS value action with the background-color attribute.
Example:

Thanks @ran.tzur for the reply. Specifically, I was looking this while testing a mobile game. i want to “wait” until a match of the color appears at specific area/pixel (e.g. if color at 120x90 = green).

Please be noted that I am not able to get the “element” from that game as TestProject does not recognize/break down the elements on the screen.

Thanks for the time and helping me out.