Is there a way to retrieve the value of a variable from javascript in katalon recorder?

I have a variable in the page’s javascript whose value determines the colors of an icon, and I need to confirm if the colors are correct. Since the colros are stored in a list, if I can get my hands on the variable I should be able to check it easily enough, but so far my attempts have not yielded any results.

I am probably missing something obvious here, but is there a simple way to retrieve the value of a javascript variable using katalon recorder?

If kazurayam’s suggestion to read the values directly from the CSS attributes defined in the DOM, and you really do need to read the value of a JS variable, then the following page may help:

Thanks, using
runScript|return window.variableName|katalonVariableName
worked.

1 Like