Selected value disappears from drop-down list when leaving the list / Iframe

I am entering data into our web-based system and have trouble with a drop-down list.
image

When ever I click on any value from that list and leave the list (send keys. Tab) or click on another field, the selected value disappears and I cannot proceed.

Selected
Empty

Note: After clicking the value from that list new content is popping up (different content for each value selected from the list)
Example content:

This is the test case I am running:
WebUI.click(findTestObject(‘Object Repository/Purchase Order/Creation/Page_oneUNOPS/div_Purchase order’))

WebUI.click(findTestObject(‘Purchase Order/Creation/Page_oneUNOPS/div_PO is the contract_DropdownIconActive’), FailureHandling.CONTINUE_ON_FAILURE)

WebUI.enhancedClick(findTestObject(‘Object Repository/Purchase Order/Creation/Page_oneUNOPS/td_PO is the contract’))

WebUI.sendKeys(findTestObject(‘Purchase Order/Creation/Page_oneUNOPS/input_Procurement process’), Keys.chord(Keys.TAB))

WebUI.setText(findTestObject(‘Object Repository/Purchase Order/Creation/Page_oneUNOPS/input_Contract cur. amount_bs309s313l309s31_8dab22’),
‘10000’)

“div_PO is the contract_DropdownIconActive” belongs to an Iframe, which is linked in the object repository.

Another way to proceed is to create a Test Object for your iFrame and then use,

WebUI.switchToFrame(findTestObject('..your iframe'))

and then create another Test Object for your drop-down that does not have the “Parent iframe” option selected. You will have to provide the pathway for these objects as you have not shown any HTML.

WebUI.click(findTestObject('Purchase Order/Creation/Page_oneUNOPS/div_Purchase order sans Parent'))

WebUI.click(findTestObject('Purchase Order/Creation/Page_oneUNOPS/div_PO is the contract_DropdownIconActive'), FailureHandling.CONTINUE_ON_FAILURE)

Hi,

I tried to switchToFrame, but it doesn’t recognize any element like the drop-down list.

Best regards