Only a frame of the same origin as the app’s page can be entered (an
<iframe srcdoc> or one of the app’s own pages): the plugin works through page
script, which cannot reach into another origin, so a cross-origin or sandboxed
frame answers 404 no such frame. Paths follow
http://127.0.0.1:4445/{token}; see the
overview for the reply format and the errors.
Once a frame is entered, these act in it: finding (from the document), the active element, the page source, scripts and actions. The current URL and the title stay the top page’s, and an element command acts on its element wherever it is. Navigating and a new session return to the top page.
A frame entered that is then removed, or that loads a page of another origin,
answers 404 no such frame (the frame entered is gone or is no longer same-origin; switch to its parent or the top page) for each command that acts
in it.
The plugin replaces alert, confirm and prompt in a frame it enters, and
in every same-origin frame when the next command runs after the frame has
loaded; a dialog the frame opens before that is the real one. See
User prompts.
Switch to frame#
POST /session/{sessionId}/frame
Enters a frame of the current frame (or of the top page), or goes back to the
top page. On macOS, an <iframe srcdoc> was entered by its element (finding, a
script, a click and its alert inside), and a sandboxed frame was refused.
The current session’s id.
null.
Errors
| Status | error | When |
|---|---|---|
| 400 | invalid argument | id is missing, negative, above 65535, a fraction, a string, or an object that is not an element reference. |
| 404 | no such frame | The frame is cross-origin or sandboxed; the element is not a frame or not in the current frame; there is no frame at the index. |
| 404 | no such element, stale element reference | The frame element’s id is unknown, or the element is gone. |
Switch to parent frame#
POST /session/{sessionId}/frame/parent
Leaves the frame entered last for its parent. In the top page it does nothing.
The current session’s id.
null.