Values for 2 fields get deleted when saving the changes

I have a screen with two fields, where I can enter values. After doing so I want to save the changes by clicking ‘Save’ button. In the instance I click the ‘Save’ button the values entered are deleted.

Information: The screen uses an iframe and all fields and the save button are within this iframe.

Here is the code used:‘SPE Tool/Menu/Page_/div_SPE printout’))

WebUI.switchToFrame(findTestObject(‘SPE Tool/SPE printout/Page_/frame_concat(id(, , contentContainerFrame, , ))_contentcontainer’),

WebUI.waitForElementClickable(findTestObject(‘SPE Tool/SPE printout/Page_/input_PO_bs4l1s4ctl00order_idi’), 0)‘SPE Tool/SPE printout/Page_/input_PO_bs4l1s4ctl00order_idi’))

TestObject testObject = findTestObject(‘SPE Tool/SPE printout/Page_/input_PO_bs4l1s4ctl00order_idi’)

// Existing steps for the PO field
TestObject poTestObject = findTestObject(‘SPE Tool/SPE printout/Page_/input_PO_bs4l1s4ctl00order_idi’)

WebElement poWebElement = WebUiCommonHelper.findWebElement(poTestObject, 30)

WebUI.executeJavaScript(‘arguments[0].value='3101300';’, Arrays.asList(poWebElement))


// Steps for the Version field
TestObject versionTestObject = findTestObject(‘SPE Tool/SPE printout/Page_/input_Version_bs4l1s4ctl00versioni’)

WebElement versionWebElement = WebUiCommonHelper.findWebElement(versionTestObject, 30)

WebUI.executeJavaScript(‘arguments[0].value='1';’, Arrays.asList(versionWebElement))



WebUI.enhancedClick(findTestObject(‘SPE Tool/SPE printout/Save/Page_oneUNOPS/span_Save’))

Before using javascript I also tried SetText / SendKeys, but here the values get deleted immediately when leaving the field.

Does anyone has an idea, what else I could try?

1 Like

A couple things:

  1. Learn to format your code here, with the backticks… Use Code Formatting feature in your posts
  2. What happens when you try this manually (i.e. NOT with Katalon Studio)? If the issue happens when you manually try these steps, then it is a bug and should be reported as such.