selectFrame HELP with [error] Invalid argument and/or [error] Timeout


#1

Please help
I have a page with the iframe id=iframMR

Everything works up to the point where i want to select dropdowns and text fields in that iframe, katalon just doesnt find it.

I’ve figured out that i need katalon to switch to that frame in order to continue… HOW?!

i have tried:

selectFrame | xpath=(.//iframe[@id=‘iframMR’]) |
selectFrame | id=iframMR |
selectFrame | id=‘iframMR’ |

Which logs:

####[info] Executing: | selectFrame | xpath=(.//iframe[@id=‘iframMR’]) | |

[info] Expand variable ‘xpath=(.//iframe[@id=‘iframMR’])’ into ‘xpath=(.//iframe[@id=‘iframMR’])’

[error] Invalid argument

i have tried:

selectFrame | index=0
(also 1, 2, 3, 4 ad infinitum)
which logs:

[info] Executing: | selectFrame | index=0 | |

[info] Expand variable ‘index=0’ into ‘index=0’

[error] Timeout

What is wrong with that command ?

storeAttribute | xpath=(.//iframe[@id=‘iframMR’])@src

correctly saves the source of that frame into a variable, why wont selectFrame work


#2

I’m not sure about this, because I don’t use the Recorder, but I assume there is some kind of switchToFrame() command that should be added before interacting with element inside of the iframe.


#3

Thast what selectFrame is supposed to be.

I have found seenium example of usage:
https://a9t9.com/kantu/docs/selenium-ide/selectframe

But this does not function as intended on Katalon, Either the syntax is different or something is broken.
I wish there was better documentation, or developers would respond…


#4

Oh, I see. Well then…


#5

I’ve increased the timeout in this beta release:

Could you please try again using syntax selectFrame | index=0 | and let me know if the timeout error still appears?


#6

is there a beta for firefox ? … forgot that i should’ve probably specified, all of the above happens (or doesnt happen) on Katalon Recorder (v 3.6.11) for Firefox


#7

Also i dont think timing out is the core problem here
im going by reference examples,

selectFrame(locator)

Arguments:

  • locator - an element locator identifying a frame or iframe

Selects a frame within the current window. (You may invoke this command multiple times to select nested frames.) To select the parent frame, use “relative=parent” as a locator; to select the top frame, use “relative=top”. You can also select a frame by its 0-based index number; select the first frame with “index=0”, or the third frame with “index=2”.

You may also use a DOM expression to identify the frame you want directly, like this: dom=frames["main"].frames["subframe"]

Please see samples at https://github.com/katalon-studio/katalon-recorder-samples. If you need more advanced functions, or the ability to write custom functions, please checkout our free Katalon Studio.

and making:

selectFrame | relative=top

also produces the error

[error] Invalid argument

:frowning:


#8

Add Pause 15000 aftee page load fixes the issue and selectFrame | index=0 works properly. thanks, dev.