WebUI.getCssValue() - Does not locate element inside the Iframe

I have an element A which is Inside Iframe X.
I have created TestObjects for element A and Iframe X and set parent object of element A to Iframe X

When calling WebUI.getCssValue() keyword on element A. it does not performs SwitchToIframe and directly starts locating element A causing script to fail.

Does it do that when parent object is checked off?

Did you use switchToIframe() or do you expect it to be done automatically?

(I’m not suggesting anything, just curious.)

I am Expecting it to automatically switch to iframe first and then locate element, just like all other inbuilt keywords.

OK. Is this how it usually works? (Still being curious :thinking:)
Because, when I used to work with iframes I just found it more robust to check-off the “parent-element” and instead add the switchToIframe() line manually.

2 Likes

It seems a bug of Katalon Studio.

+1, Endorsed.

For me, relying on externally modified, environment-hosted settings is the last resort, not the first.

I’ve only ever had success with iframes using switchToFrame() as well. +1 from me

1 Like