# Values for 2 fields get deleted when saving the changes

**URL:** <https://forum.katalon.com/t/values-for-2-fields-get-deleted-when-saving-the-changes/116694>\
**Category:** Web Testing\
**Tags:** web-testing\
**Created:** [February 5, 2024, 7:04am UTC](https://forum.katalon.com/t/values-for-2-fields-get-deleted-when-saving-the-changes/116694 "2024-02-05T07:04:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruedigerl](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ruedigerl/32/22830_2.png) [@ruedigerl](https://forum.katalon.com/u/ruedigerl)\
**Post date:** [February 5, 2024, 7:04am UTC](https://forum.katalon.com/t/values-for-2-fields-get-deleted-when-saving-the-changes/116694/1 "2024-02-05T07:04:37Z")

</div>

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:  
WebUI.click(findTestObject(‘SPE Tool/Menu/Page\_/div\_SPE printout’))

WebUI.switchToFrame(findTestObject(‘SPE Tool/SPE printout/Page\_/frame\_concat(id(, , contentContainerFrame, , ))\_contentcontainer’),  
30)

WebUI.waitForElementClickable(findTestObject(‘SPE Tool/SPE printout/Page\_/input\_PO\_bs4l1s4ctl00order\_idi’), 0)

WebUI.click(findTestObject(‘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))

WebUI.delay(5)

// 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.waitForJQueryLoad(0)

WebUI.delay(10)

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?

---

<div class="post-metadata">

**Author:** ![mwarren04011990](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/mwarren04011990/32/26024_2.png) [@mwarren04011990](https://forum.katalon.com/u/mwarren04011990)\
**Post date:** [February 5, 2024, 8:15am UTC](https://forum.katalon.com/t/values-for-2-fields-get-deleted-when-saving-the-changes/116694/2 "2024-02-05T08:15:03Z")

</div>

A couple things:

1. Learn to format your code here, with the backticks… [Use Code Formatting feature in your posts](http://forum.katalon.com/t/use-code-formatting-feature-in-your-posts/23550)
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.
