18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
i get rgb(245,245,245) when getting the background color
i have a body background color of #F5F5F5 but sahi gets retrieves rgb(245,245,245).... how come???
when i tried this:
_assertEqual("#F5F5F5", _style(document.body, "background-color" ));
i get this
[Assertion Failed]
Expected:[#F5F5F5]
Actual:[rgb(245, 245, 245)]
also, with #FFFFFF
i get this
[Assertion Failed]
Expected:[rgb(255, 255, 255)]
Actual:[transparent]
anyone has thoughts on this??
thanks,
=tinchie=
when i tried this:
_assertEqual("#F5F5F5", _style(document.body, "background-color" ));
i get this
[Assertion Failed]
Expected:[#F5F5F5]
Actual:[rgb(245, 245, 245)]
also, with #FFFFFF
i get this
[Assertion Failed]
Expected:[rgb(255, 255, 255)]
Actual:[transparent]
anyone has thoughts on this??
thanks,
=tinchie=
Comments
I also face alot many problems using asserts. Try direclty retreiving the colour value using DOM concepts.
Then you can put a check on the retrieved value. You can post your code snippet where the color value is set. Will try to get the color value.
Regards,
Pankaj.
i think i already got the idea of the colors.....
#F5F5F5 = rgb(245, 245, 245)
where F5 when converted to decimal, it is equal to 245.. so F5F5F5, you group it by 2's F5-F5-F5 , is equal to 245-245-245......
so:
#F5F5F5 = rgb(245, 245, 245)
but i dont understand with white... #FFFFFF = transparent
i've tried with other colors and they work when i do those things above...
i think that's how i did it.... any other suggestion?
thanks
=tinchie=
You are right. thats exactly how it works. #FFFFFF = rgb (255,255,255).
No further thoughts as of now..:(
Pankaj.