Overview
This guide explains how to identify iFrames in a web application and use the correct iFrame index in the TG Testcase Writer for web automation.
Prerequisites
Before handling iFrames, ensure the following:
Access to the target web application is available.
Browser Developer Tools are accessible.
TG Testcase Writer is available for automation.
Steps
Step 1: Open Browser Developer Tools
Open the target web application in the browser.
Caption: Open the target web application
Open Developer Tools.
Caption: Open browser Developer Tools
Step 2: Find the iFrame
Press
Ctrl + Finside Developer Tools search.
Caption: Open the search option in Developer Tools
Search using the following syntax:
//iframe[0]
Caption: Search for the iFrame using index
Identify the required iFrame and note the index value.
Caption: Identify the required iFrame index
Step 3: Use Alternate Syntax if Required
If the index is the same, use the following syntax:
(//iframe)[0]
Caption: Search iFrame using alternate syntax
Find the respective iFrame and use the identified index in the TG Testcase Writer to switch to the iFrame.
[Screenshot: TG Testcase Writer iframe switch]
Caption: Use the iFrame index in TG Testcase Writer
Outcome
After completing these steps:
The required iFrame will be identified successfully.
The correct iFrame index can be used in TG Testcase Writer for web automation.
Still have a question?
Support Contact:
support@testgrid.io
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article