Triple double quotes not working in Groovy script

Please let us know what you are using Katalon Studio for?

I have currently applied Katalon Studio in my project
& I’m learning automated test with Katalon Studio

How would your work be affected if this issue has not been resolved?

I can continue my job, resolving this ticket can boost my performance

Operating System

Windows 10

Katalon Studio Version

Version: 8.1.0
Build: 208

Environment (for Web testing):

Not relevant.

Steps to reproduce:

Any news on this one?

I just got the very same bug, when I try to store a json-Script into a variable, and then switching between “Script” and “Manual” mode.

String result = WebUI.getText(findTestObject('path/to/object'))
def json = """
{
   "lalelu": {
       "lalelu": = '${result}'
   },
   { ... some more json ... }
}
"""
WebUI.setText(findTestObject('path/to/object'), json)

Expected Behavior:

The Groovy-Script just works as above.

Actual Behavior:

It actually does not, and I get the same bug as in the mentioned report from 2018.
When I switch between “Script” and “Manual” mode, Katalon is kind of formating this code and removes two of the three double-quotes.
So it looks like this at the end, and I get a compile-error.

String result = WebUI.getText(findTestObject('path/to/object'))
def json = "
{
   "lalelu": {
       "lalelu": = '${result}'
   },
   { ... some more json ... }
}
"
WebUI.setText(findTestObject('path/to/object'), json)

I know I could also use a compressed, single-line json, as I did before:
WebUI.setText(findTestObject('path/to/object'), '{some-compressed-inline-json}')

But now I need to hand over a variable (result) into this json-code and it’s not working without this triple double-quotes. Expcept you have another solution /workaround for me? Would be so nice!

This is my first bug report over here, and I hope it’s not a problem, that I made another one for this already reported bug. But this has been in 2018 and I could not really see, if this was solved or not?
And perhaps after solving it, the bug came again?
But the report was at least closed, and I couldn’t just write a comment.

All the best,
Simon

Hi @simon.klotz,

Thank you for providing the information,
Could you please try CTRL + SHIFT + F in the file and see whether it happens the same?

Regards,
Nam Nguyen.

Hi @nam.nguyen,

Yes, directly after pressing CTRL + SHIFT + F two of the three double-quotes are removed.

thanks,
Simon

Hi @simon.klotz,

We will put in this issue in the backlog and let you know when it’s ready to serve.
Thanks for your attention.

Regards,
Nam Nguyen.