# verifyElementHasAttribute should return boolean but instead forces ERROR

**URL:** <https://forum.katalon.com/t/verifyelementhasattribute-should-return-boolean-but-instead-forces-error/36726>\
**Category:** Bug Report\
**Tags:** katalon-studio, bugs-report\
**Created:** [November 22, 2019, 3:31pm UTC](https://forum.katalon.com/t/verifyelementhasattribute-should-return-boolean-but-instead-forces-error/36726 "2019-11-22T15:31:31Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [November 28, 2021, 2:13am UTC](https://forum.katalon.com/t/verifyelementhasattribute-should-return-boolean-but-instead-forces-error/36726/19 "2021-11-28T02:13:44Z")

</div>

I think, your question on one of the FAQ in this forum, but has never been addressed.

Here is my solution to your question:

> [@How to verify CSS property of HTML element](http://forum.katalon.com/t/how-to-verify-css-property-of-html-element/60395):
>
> Problem to solve Here is an usual web page. [User forum page](http://forum.katalon.com/t/verifyelementhasattribute-should-return-boolean-but-instead-forces-error/36726/) I want to write a Test Case script in Katalon Studio, that verifies if the background-color of the page header elemennt is #1779de . [[screenshot]](https://github.com/kazurayam/ks_verify_CSS_property_computed/blob/master/docs/images/screenshot.png) Katalon Studio does not provide a built-in Keyword that solves my problem out of box. I need to develop a custom solution. But how? Solution In JavaScript on browser, you can call window.getComputedStyle(element) : [Winndow.getComputedStyle(element)](https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle) The Window.getComputedStyle() me…

---

_[View the full topic](https://forum.katalon.com/t/verifyelementhasattribute-should-return-boolean-but-instead-forces-error/36726)._
