How to get color of the Element

Hi guyz,

I have one element which changes color on click, but I don’t see any color attribute in the object details, in both the situation i.e. before and after clicking the element.

Can anybody help me on that… how can I get the color of element.

have tried this
String css_color = WebUI.getCSSValue(findTestObject(‘Booking Flow/Search result/FavoriteButtonSearchResult’), ‘color’)

println(css_color)

//WebUI.verifyEqual(css_color, )

and this shows following error

Cannot get CSS ‘color’ value on ‘Object Repository/Booking Flow/Search result/FavoriteButtonSearchResult’. (Root cause: com.kms.katalon.core.webui.exception.BrowserNotOpenedException: Browser is not opened

Thanks!

can you post html of element ± lines before and after so we can see how it looks like?
even better would be html of element before and after click
and error is about not started browser for some reason…

@Shweta sao

Was the browser started? Show us your script…

Sorry for misconception…

I think css will not get used in mobile app… so there is no possibility of opening a browser.

But in Object repository i don’t see any attribute for color as well.

Is there a way to get color of the element?