how to fetch the correct font size value.

Hello, I’m fairly new to Katalon and I’m trying to create a testcase to verify a web label font size.

When I use getcssvalue to fetch the value, it returns with the wrong font-size value(16px)(The one with a strike-through in the attached image).

fontSize = WebUI.getCSSValue(findTestObject(‘websiteName_Home/label_Blog’), ‘font-size’)

Is there any way that I can get the right font-size value(24px)?

Thank you!

Give this a try:

This way, you can fetch the computed font size value.

Hi @kazurayam , I read your post and try downloading your demo and run the demo on local, but it keeps getting this error message everytime it gets to step executeJavaScript().

how do I resolve this error?

My demo used the old Katalon Forum page as the testbed. My previous post is dated Nov 2021, 15 months ago. Since then, the Katalon User Forum page has changed its design. So my demo does not work any longer. I hope you can learn the necessary programming technique out of the sample code.