I’m pretty new to Katalon Studio and I’m trying enter value in the text field but no hope.
do you have any solution to get/define/get through to the specific iFrame?
Please see the details below.
Text box and Inspect Element
Xpath captured while recording:
Object properties captured while recording:
try to use css selector as locator
There are a few ways to tackle this so relax in the knowledge something will work for you. I’m with Timo, I’d use CSS selectors for this (that’s what browsers do natively, so why not?)
First, take a read of this article I posted a while back. There’s a section devoted to dealing with iframes. Get that knowledge under your belt and then post back if you still have questions/problems.
And just for completeness, you might also benefit from a related article: DevTools
The below assumes that your page contains one (and only one) iframe, and that it is not nested inside another iframe:
1.) In your test object, you just need one row, Name = “xpath”, Condition = “equals”, Value = “//iframe”, Detect object by? = checked
2.) Switch to the frame with the below code:
3.) Use whatever code to set the field.
Again, this assumes you are working with only 1 iframe. If there are multiple frames, or nested frames, you will need a more specific xpath to find the right one.