Hi @farooqi.uzair1990,
Not sure if I can simulate your situation 100% the same but I think that below solution will be work.
- I try to simulate your situation with below HTML as an example:
There is one textbox which is displayed under iframe, see below image
-
Now, we want to interact with text box, for this case I use to settext for this object
-
Solution:
A: Using keyword provided by Katalon switchToFrame, your side does not work well with this solution
B. I try the work around by capturing object under the iframe and seeing it work
B1. Identify object textbox
B2.Identify iframe
Now, you are able to using keyword settext to enter text directly to your text box
Solution A & B, Katalon users will try with them
C. For solution C, selenium users will try as below
C1. Get web driver from Katalon
C2: Identify iframe object
C3: Switch to this iframe
C4: identify the inner iframe object (this case is text box
C5: settext for object in step C4
Below is example:
import org.openqa.selenium.By
import org.openqa.selenium.WebDriver
import com.kms.katalon.core.webui.driver.DriverFactory
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
WebUI.openBrowser(‘’)
//
WebUI.navigateToUrl(‘file:///C:/Users/…/Desktop/Demo%20Guru99%20Page_Iframe.html’)
WebDriver driver = DriverFactory.getWebDriver()
iframe = driver.findElement(By.xpath(“//iframe[@id=‘a077aa5e’]”))
driver.switchTo().frame(iframe)
myTextBox = driver.findElement(By.xpath(“//input[@length=‘20’]”))
myTextBox.sendKeys(“18001091”)
After executing: it run successfully with text entered as below screenshot
Hope it is useful.
FYI.
Note: For your case, from your site, need to check switch to windows, window index to make sure driver navigate to new gmail tab/windows before doing next actions