You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are currently several problems with handling frames that should be resolved. Some of these problems are already covered by existing issues, but this new issue list all these highly related problems in one place. The whole frame handling logic should be rewritten and all these problems resolved at the same time.
We should see could we deprecate all Current Frame ... keywords. It would be better that after selecting a frame, all subsequent keywords would operate in the frame. This may actually already be the case, except with Page Should (Not) Contain which looks from the root (see 3. above).
If all keywords operate on the selected frame, Page Should is pretty misleading wording. Should we consider renaming these keywords like Page Should Contain -> Text Should Be Present, Page Should Contain Element -> Element Should Be Present?
Additionally to the problems already listed, there is a similar problem with the Frame Should Contain Keyword, the driver is switched back to the default context, which is undesirable when working on sub frames. (expected to end up at the window/frame that we started from, not the main window).
Hi,
My problem is related to frames management with RFW but I don't know if it's the right place to discuss about it.
I'm using RFW 3.2.2 with Python 3.9 on Windows with FF or Chrome.
I'm working on a app with lots of frames which contains iframes, some are dynamically created...
Page
Frame1
IFrame1
IFrame2 (not created yet)
Frame2
Frame3
Select Frame Frame1 is OK
Select Frame IFrame1 is OK (Displays a form)
Input Text Name Hello is OK
Click Button Save (button in the IFrame1) is OK (by clicking this button, the app dynamically creates a new iframe IFrame2)
Unselect Frame
Select Frame IFrame2
IFrame2 can't be selected. If I execute javascript to get the reference, I can get it but I then get the StaleReferenceException if I try to select it through Select Frame
Ok, I found the solution. As I read somewhere in another issue, Unselect Frame returns you to the top parent, so the solution was to look for the elements from the beginning.
So after the Unselect Frame, I now do:
Select Frame Frame1
Select Frame IFrame2
and everything works like a charm.
But the issue about the top parent is annoying because really not intuitive.
Sorry to have bothered you for so little things but I was going crazy...
Activity
mcleanmds commentedon Feb 2, 2018
Additionally to the problems already listed, there is a similar problem with the
Frame Should ContainKeyword, the driver is switched back to the default context, which is undesirable when working on sub frames. (expected to end up at the window/frame that we started from, not the main window).tmaleckiplacester commentedon Aug 30, 2019
Any update on this one?
aaltat commentedon Aug 30, 2019
There is not progress for this issue because no-one has seen it enough important to invest time.
MininAS commentedon May 4, 2020
@pekkaklarck Do we have some progress in this issue :)
aaltat commentedon May 4, 2020
Nothing has happened since my last comment.
jck1307 commentedon Nov 3, 2020
Hi,
My problem is related to frames management with RFW but I don't know if it's the right place to discuss about it.
I'm using RFW 3.2.2 with Python 3.9 on Windows with FF or Chrome.
I'm working on a app with lots of frames which contains iframes, some are dynamically created...
Select Frame Frame1 is OK
Select Frame IFrame1 is OK (Displays a form)
Input Text Name Hello is OK
Click Button Save (button in the IFrame1) is OK (by clicking this button, the app dynamically creates a new iframe IFrame2)
Unselect Frame
Select Frame IFrame2
IFrame2 can't be selected. If I execute javascript to get the reference, I can get it but I then get the StaleReferenceException if I try to select it through Select Frame
Any ideas?
jck1307 commentedon Nov 3, 2020
Ok, I found the solution. As I read somewhere in another issue, Unselect Frame returns you to the top parent, so the solution was to look for the elements from the beginning.
So after the Unselect Frame, I now do:
Select Frame Frame1
Select Frame IFrame2
and everything works like a charm.
But the issue about the top parent is annoying because really not intuitive.
Sorry to have bothered you for so little things but I was going crazy...
Thanks for the work, RFW is really interesting.
JC
aaltat commentedon Nov 3, 2020
Yes, we do not keep track of the frames and Selenium API only allows to select top most page.
If that is not documented, then it should be fixed.
jck1307 commentedon Nov 3, 2020
Indeed, in the docs (https://robotframework.org/Selenium2Library/Selenium2Library.html#Unselect%20Frame) it is written:
It should be better to say it cancels all the previous Select Frame calls and sets you to the top, not the direct parent.
All is a little word, but it matters :-D
JC
aaltat commentedon Nov 3, 2020
Yes, that could be enhanced. Would you like make a PR to fix it?
aaltat commentedon Nov 3, 2020
Please remember that Selenium2Library is not maintained and correct project is https://github.com/robotframework/SeleniumLibrary#keyword-documentation (Although the text is same in both)