Switch iframe doesnt work

Hi guys,

I used Switch to Frame function to jump into an iframe page, but I failed. I tried to use id/class/xpath/css…, all of them dont work. Could you give me some idea on this case?

Error Message:

Unable to send keys ‘test’ to object ‘Object Repository/SearchMessage/Page_/input_message’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/SearchMessage/Page_/input_message’ located by ‘By.xpath: //*[@id = ‘showIframe’ and @name = ‘showIframe’]’ not found)

Thanks in advance,
Ricky

The error message is saying there is not element with that ID and that NAME. Are you certain the iframe has that id?

Thank you, Thomas

Issue resolved, I found the reason. I used spy web to record the page, including iframe page and one element in iframe. Then I used keyword switch to frame and then send key to the element, I switched to iframe successfully in fact. But I didnt notice in element Object, there is a option ‘Parent iframe’, it will cause the action switch to frame to be executed again, so I select ‘no’ action. It works.

1 Like

Hi Hu_yu

How can i make a keyword switch to frame ?
I got a issue at step : Switch to frame

Can you help me