verifyElementHasAttribute should return boolean but instead forces ERROR

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

Here is my solution to your question: