Store if an attribute of an element exists


For my test into Katalon Recorder, I’m trying to save in a variable if an element exists, I’m using the command storeElementPresent which allows to return true or false.

I would like to do the same for an attribute of an element:

I don’t know exactly which command to use for that (I don’t find the same for Attribute).

Could you please help me with that ?

Thanks in advance for your help

When you say storeElementPresent do you mean this?

If so, and if I understand you correctly (it sounds like you want to check if an element is present/has an attribute), have you tried:



Here is link to the documentation

Thanks for your reply. Nevertheless I’m using directly Katalon Recorder tool, and this command is not present inside:


Why not you try the storeAttribute command?


@kazurayam because if the attribute doesn’t exist, the test fails. Before to test the attribute value, I would like to test if the attribute exists.

Then why not you test if the attribute exists using the verifyAttribute command before calling storeAttribute?

I tried, but when I use it the result is “could not find the element attribute”. (as with storeAttribute) The result is not saved in a variable

When an attribute is NOT present, what sort of “result” do you expect to be saved in a variable?

I don’t know Katalon Recorder at all. Katalon tells that Katalon Recorder is a Selenium IDE-compabile alternative. So I searched info about Selenium IDE.

The following link tells that in Selenium IDE you can refer to the built-in statusOK variable to check the result of last-executed command. See

verifyElementPresent (locator)
if | !{!statusOK}
 Click (...)

I searched but couldn’t find any URL that tells the availiability of statusOK in Katalon Recorder.


Do you know if the statusOK variable works in Katalon Recorder as well?

Is the attribute only ‘present’ via a shadow / virtual DOM? (e.g. React, AJAX, etc) If so, you may need to first interact with an element, or trigger its visibility in some other way, in order to verify the attributes.

Hi @mwarren04011990
Altough i like the sollutions you propose, you should be aware that, the current topic is about Katalon Recorder.

Which is a different animal compared with Katalon Studio.
Have the roots in Selenium IDE and so on (feel free to read lot of debates) but such like:
WebUI.verifyElementHasAttribute(yourTestObject do not apply for this tool.


Thanks for letting me know. Ima sit this one out

Worry not, this toy is unfamilliar for a lot of good experts here …
I was confused also, plenty of the times.
But yeah, is a totally different toy which need different solutions (mostly it requires JS voodoo)

the code of the toy is here (and is opensourced)

1 Like