How to use do while loop in katalon

Hello Team,

How to perform do while loop in Katalon?

When we enter do{
}while(true);

it is giving an error, unexpected token: do

@devalex88 @kazurayam please help .

There is no do {} while () syntax in Groovy language.

See

Thanks @kazurayam

This is incorrect as of Groovy 2.6 and is mentioned in the stack overflow answer linked above. It requires using the Parrot parser to get access to new syntactical options.

Here is the official documentation: https://groovy-lang.org/semantics.html#_do_while_loop

What do you mean “this is incorrect”?

This document describes the latest Groovy 3 syntax.

Inside Katalon Studio, we can only use Groovy 2.4.X. We can not use Groovy 3 syntax in Katalon Studio.

do while syntax is indeed now available (since Groovy 2.6, and now 3.0). However, it is unfortunately up to Katalon developers to update to a compatible version, which it looks like they tried at one point, gave up on it, and slated it for the 8.0 release (which is now out). So, who knows what they’re doing now…