Select Frame into another Frame

rvmsengrvmseng Posts: 79
edited December 2018 in SOAtest

Dear Support,

I want to know how can I select a Frame into another Frame, please refer to attached picture.
In the below picture the "workframe" is into "mainframe".


  • rvmsengrvmseng Posts: 79


    please assist me.

  • tonytony Posts: 23

    SOAtest does not have the ability to select frames. Instead SOAtest will automatically traverse frames and interact with the first element that matches the criteria given in the Element Locator.

    If SOAtest is finding the wrong element, try adding more detail to your element locator. For example, there may be a distinct parent element that differentiates the element you are trying to find from the wrong element. Then you could use an xpath like


    Alternately, you may be able to use an Execute JavaScript action to traverse the frames and interact with the element of interest if they are all on the same domain. For example, this code finds a button inside a frame:

    var theFrame = document.getElementsByTagName("frame")[0];
    var theFrameDocument = theFrame.contentDocument || theFrame.contentWindow.document;
    var button = theFrameDocument.getElementById("mybutton");
  • rvmsengrvmseng Posts: 79
    edited January 2019


    Unfortunately I cannot parameterize values in "Execute JavaScript action", please refer to following sample code:

    function setText(input){
        var mainframe=window.frames["mainframe"].document;
        var workframe=mainframe.getElementsByName("workframe")[0];
        var elms=workframe.contentDocument.getElementsByName("custom_field_0_62");

    Also I cannot use "context.getValue()" in Execute JavaScript action.

  • rvmsengrvmseng Posts: 79

    I think this is very big fault, because we cannot access to internal frames, and if we want to use "Execute JavaScript action", unfortunately we cannot parameterize values.

  • tonytony Posts: 23

    we cannot access to internal frames

    To be clear, you can access internal frames. SOAtest automatically traverses all frames when looking for an element. You do not need to specify a frame for that to happen. If SOAtest is not finding your element, then that is an issue with your element locator and has nothing to do with frames.

  • rvmsengrvmseng Posts: 79
    edited January 2019

    Dear Tony,

    I tested many different state and I found that SOATest cannot find elements in inner frames, It only determine elements in main frame not inner frames. you can test it.

    Also I want to use XPATH for addressing inner frames, but unfortunately XPATH doesn't have this ability.

  • jakubiakjakubiak Posts: 664 admin

    Tony's understanding is correct - SOAtest can find elements in inner frames in general. It is not clear why it is not working for you. I would recommend you contact SOAtest support to follow up on this issue because there is probably something specific to your test case that needs to be worked out.

Sign In or Register to comment.