Arjuna currently has basic support for frame handling in the web browser.
From Selenium perspective, a context switching is involved. To find and interact with elements one has to switch the WebDriver to context of frame.
This is wrapped inside Arjuna logic.
GuiFrame is the obejct in Arjuna that represents a frame.
You can locate a GuiFrame with any of the identification strategies that are used for GuiWidgets.
frame = app.frame(id="someframe")
Frame in GNS¶
To define a frame in GNS specify type as frame.
myframe: type: frame id: someframe
frame = app.gns.myframe
Dynamic Waiting for Presence of a Frame¶
A frame is automatically waited for in Arjuna.
As soon as a frame is located, Arjuna automatically switches context to it.
Exiting a Frame¶
Finding Elements inside a Frame¶
Once a frame object is created, you can find any types of GuiWidget inside it using the frame object itself.
Coded Element Finding inside Frame¶
GNS Element Finding inside Frame¶
A frame element has access to the GNS file for the GuiApp/GuiPage/GuiSection it is defined for.
myframe: type: frame id: someframe myelement: name: somelement
frame = app.gns.myframe elem = frame.gns.myelement
Important Information on Frames in GuiSection¶
A GuiSection object in Arjuna can define a root element which is used for nested element finding for the elements inside this section.
As a frame switching loads a fresh DOM,such nested element finding is not possible.
So, for elements that are present inside a frame, provide the identifiers in a way that they are not planned as nested.