Select Frame into another Frame
Comments
-
Dears,
please assist me.
0 -
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
//parent[@attribute='parentValue']//input[@id='custom_field_0_64']
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");
0 -
Dear,
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"); elms[0].value="${myVar}"; }
Also I cannot use "context.getValue()" in Execute JavaScript action.
https://forums.parasoft.com/discussion/comment/11107#Comment_11107
0 -
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.
0 -
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.
0 -
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.
https://stackoverflow.com/questions/9942928/how-to-handle-iframe-in-selenium-webdriver-using-java
0 -
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.
0