iframe could not be located in SAP Web UI

Hi All,

I’m trying to automate the SAP Web UI using “Record web” option, When I tried to re-run the test case, the test case failed with the below error :

"Caused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: 'Object Repository/test3/SA_d933aa/iframe_concat(id(, , isolatedWorkArea, , )) located by ‘//iframe[@id=‘isolatedWorkArea’]’ not found"

I tried Switch to frame, it didn’t work.
I’m unable to view the frame source as its an SAP web UI.

Below is the object property of the Iframe -

Kindly provide suggestions for the above issue, Thanks in advance

1 Like

Perhaps your script is too fast for your browser, so you may have to wait for your browser to “catch up”. You will have to insert statements like:
WebUI.waitForPageLoad(10) // when you move to a new page
WebUI.waitForElementVisible(findTestObject(...), 10)
WebUI.waitForElementClickable(findTestObject(...), 10)
WebUI.waitForElementPresent(findTestObject(...), 10)

in places where you are moving to new pages and where events are happening that elements “appear” that were not there before, and as a test that your objects are on your page. If you are recording, these statements don’t get put into your code, but you will see your code becomes more stable (fewer WebElementNotFoundExceptions) with them.

Additionally, the recorder does not insert any verify statements which I think you should add because you are trying to verify that something has happened, such as click on a radio button, or added some text to a box.
WebUI.verifyElementChecked(findTestObject(...), 10)
WebUI.verifyElementAttributeValue(findTestObject(...), "value", "your text here", 10)

So again, your recorder has given you a bare bone code base, now you have to go in and add the waits and verifys to flush your code together.