TestProject Forum
Powered by leading experts in the test automation community

Unable to write test for color picker in Web

I have a color picker on my page i want to write a test to select a color and get the changed hex value to be compared with a specific predefined hex value.
How do i do it

Hello @Puja.

You can get the RGBA value of the element at the moment by getting the value of the corresponding CSS property from the element.

The the action ‘Get CSS value’ with the ‘background-color’ property:

This will give you the color of the element in the result in that format as defined in the page’s CSS:

From there you can add any validation on the output using the step editor:

img3

1 Like

Thank you it worked for me.

1 Like

Glad to hear. :slightly_smiling_face: