Exporting If..ElseIf from Recorder to Studio with String values

Hello,

I’m trying to export a simple test form Recorder to KStudio:

It works fine in the Recorder (Chrome).

I export it to Studio:

String erreurpw = selenium.getText("id=password-error")System.out.println(erreurpw);selenium.if("'" + erreurpw + "'=='This field is required.'")selenium.type("id=password", "aaaaa")selenium.endIf()

Running in Studio:

05-30-2018 10:11:13 AM - [ERROR]  - Test Cases/MyTest FAILED because (of) groovy.lang.MissingMethodException: No signature of method: com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium.if() is applicable for argument types: (java.lang.String) values: ['This field is required.'=='This field is required.']Possible solutions: is(java.lang.Object), find(), wait(), any(), find(groovy.lang.Closure), wait(long)05-30-2018 10:11:13 AM - [START]  - Start action : Statement - selenium.if("'" + erreurpw + "'=='This field is required.'")05-30-2018 10:11:13 AM - [END]    - End action : Statement - selenium.if("'" + erreurpw + "'=='This field is required.'")

Of course I could change the “selenium.if(…)” with a if(…) {…}, but it has to be done manually.

Is there any synthax in the recorder that could fit a conform export in the Studio ?

Some people recording tests have absolutely no programming knowledge, and would like to reuse their Test Cases (recorded through the browser plugin) in the Studio (for data driven tests, etc).

Of course, recording directly in Katalon Studio would be better, but it requires some extra training.

Many thanks for your answer.

Katalon Studio Version: 5.4.1
Chrome: Version 66.0.3359.181
Katalon Recorder (Selenium IDE for Chrome) 3.5.6

image.png

Sorry for the inconvenience. We appreciate the feedback and we will update the formatter in future releases.