Situation : In the script view, I write the following:
String Beginning_date = ( new Date()+1 ).format('dd/MM/yyyy')
However, when I use the manual view to change or add an item I lose the open/close parens and the code is changed to
String Beginning_date = new Date()+1.format('dd/MM/yyyy')
Expectation: I expect the code to remain unchanged
Actual: The code has been changed
Note: The Manual View displays the code incorrectly as
String Beginning_date = new Date()+1.format('dd/MM/yyyy')
I'm assuming because it's represented incorrectly, it is saved that way when I make a change in the
manual view
I tried repeating your issue (KS v7.0.0) but failed. My KS is set to use Script view by default.
There are also a bunch of settings under Groovy and Java related to formatting.
Iām on (KS v6.3.3),
Changing from āin Manual Viewā to āIn script Viewā and playing around with the groovy / java formatting didnāt make a difference.
Maybe it has been fixed in version 7 , but version 7 is still beta and Iām staying with 6.3.3 for now.
If you want to replicate the problem, try it in version 6.3.3.
Upgraded to version 7.0.8
The problem is still there
@devalex88
I just confirmed this is a bug. Visiting Manual view and making a change will destroy the parens in the example.
Steps:
- Enter this in Script view:
String Beginning_date = ( new Date()+1 ).format('dd/MM/yyyy')
-
Visit Manual view and add WebUI.acceptAlert()
-
Go back to Script view and observe broken codeā¦
@Matthew_Loo
One last thing to check:
My preferences are set as displayed
I also have a situation where Iām losing my CustomKeywords function parameters if you preform the same step as described.
Steps:
- Enter this in Script view:
CustomKeywords.ācom.database.sqlserver.executeProcā(DBserver:GlobalVariable.DBserver,
automationDB:GlobalVariable.automationDB,
DBusername:GlobalVariable.DBusername,
DBpassword:GlobalVariable.DBpassword,
client_name:GlobalVariable.test_client,
proc_name:ādelete_PersonAlertā,
RBdatabase:GlobalVariable.RBdatabase)
-
Visit Manual view and add WebUI.acceptAlert()
-
Go back to Script view and observe broken codeā¦
CustomKeywords.'com.database.sqlserver.executeProc'()
Hi. We will work on a fix for this soon. Thank you everyone for the bug report.
1 Like