Hidden iframe intercepting my test's clicks

Hello, I am new to the world of software test (intern), and have been learning the basics of the Katalon Studio software to evaluate its use for my team.

I have run into an issue with my automated tests I have written for my organization’s web app. Configuring users, groups, roles, etc are all done with a series of nested modals. The first modal can be identified with a relative iframe object. No problem there.

The issue comes up when my steps lead Katalon Studio to a second, nested modal:
As best as I can tell, two dynamic iframes appear with any nested modal - The first one covers the whole page in a hidden state, the first iframe shown in the HTML.
The second one is the desired modal itself, the second iframe with class=“HostedPage_Iframe”.

No matter what I do, the hidden iframe intercepts all of my clicks. I have configured my test objects with the second iframe as the Parent iframe, but something about the nature of the hidden iframe continues to obstruct my progress. I have tried using the Focus keyword as well, but for whatever reason, it did not help either. My team is at a loss as well.

I’ve been combing through topics and the KS docs for a few days now, looking for any insights, but I feel like I’m at my wit’s end. Either there is no related topic, or my fatigue has blinded me to it.

I am providing context below, with sources removed, per my lead.

Here is my KS error message:

=============== ROOT CAUSE =====================

Caused by: org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element <iframe frameborder=“0” class=“HostedPage_Iframe” name=“0e25f890-df0b-a547-359d-859f5f6ea34f” src="*******" cd_frame_id_=“161ee124f87ed99edcb8444bcb469ffc”> is not clickable at point (237, 569). Other element would receive the click: <div class=“HostedPage_ModalShroud” style=“display: block;”>

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html

================================================


Here is the HTML that includes both iframes, with the sources removed:

Lastly, my test script in its current form. It is not complete because I saw no use in finishing out the test until I could overcome this iframe issue:

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testng.keyword.TestNGBuiltinKeywords as TestNGKW
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys

WebUI.openBrowser(’’)

WebUI.navigateToUrl(’*****’)

WebUI.setText(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/Page_TPG CX Platform/input_Username_UserName’),
‘*****’)

WebUI.setEncryptedText(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/Page_TPG CX Platform/input_Forgot Password_Password’),
‘*****’)

WebUI.click(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/Page_TPG CX Platform/input_Forgot Password_tpgbutton login-btn’))

WebUI.click(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/Page_TPG CX Platform/span_Portal Admin’))

WebUI.click(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/Page_TPG - Portal Admin/div_Roles’))

WebUI.click(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/Page_TPG - Portal Admin/div_Add Role’))

WebUI.enhancedClick(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/Page_TPG - Portal Admin/div_Role Category_RoleCategory-b’))

WebUI.click(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/Page_TPG - Portal Admin/div_***’))

WebUI.setText(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/Page_TPG - Portal Admin/input_Role Name_RoleName’),
‘test’)

WebUI.click(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/Page_TPG - Portal Admin/button_EditRole_Create’))

WebUI.enhancedClick(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/Page_TPG - Portal Admin/input_Application Access_ButtonHelper-1-b47_eb5e30’))

WebUI.click(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/Page_TPG - Portal Admin/div_Role Profiles’))

WebUI.click(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/Page_TPG - Portal Admin/input_Role Profiles_ApplyRoleProfileBtn’))

WebUI.click(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/Page_TPG - Portal Admin/div_Select a Profile to apply_ProfileList-b’))

WebUI.click(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/Page_TPG - Portal Admin/div_Agency Sample Access’))

WebUI.click(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/Page_TPG - Portal Admin/input_Agency Sample Access_ApplyBtn’))

WebUI.click(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/RepairRunObjects/Page_TPG - Portal Admin/div_Hierarchy_ListControlHelper-1-dea69ebe-_dc909d’))

WebUI.click(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/RepairRunObjects/Page_TPG - Portal Admin/div_*** (1)’))

WebUI.click(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/RepairRunObjects/Page_TPG - Portal Admin/input_Include Child Hierarchies_SaveRolePro_b70092’))

WebUI.click(findTestObject(‘Object Repository/CXP-1189 Functional Test Objects/RepairRunObjects/Page_TPG - Portal Admin/input_Role Profile Saved_tpgbutton’))


I would appreciate any insights! I may have missed something simple - there’s still so much I haven’t learned yet.!

Hi @isaac.gallup, Start off by searching the Katalon forum using ‘iframe #documentation
https://forum.katalon.com/search?q=iframe%20%23documentation
This worked for me: How to handle iFrames using Selenium Webdriver: switchTo()

@isaac.gallup

Please follow @Dave_Evers advice first, then let us know if it works. I am always intrigued by iframe issues since many users suffer similar issues, so it’s good to get feedback.

By the way, I made some adjustments to your post to help your code and screenshots appear better (you can review them by editing your post).

The Selenium Webdriver fix seems to be working! I will attempt building a full test to verify it.

Thank you both for the input. I will follow up once I’ve run through a completed test with my team.

I just wanted to say thank you again! It’s worked for a second test in a different app with a different modal design/template.

Excellent news :sunglasses: