Skip to main content

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.

Info

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

Verified on macOS: a frame element Not run on a real app yet: an index

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.

sessionIdstringrequired#

The current session’s id.

idnull | integer | objectrequired#

One of:

  • null: the top page;
  • an index, 0 to 65535, into the current page’s frames (window.frames), which must be an iframe or frame element of the current document;
  • a frame element’s reference: an iframe or frame element in the current frame’s document.
valuenullrequired#

null.

Errors

StatuserrorWhen
400invalid argumentid is missing, negative, above 65535, a fraction, a string, or an object that is not an element reference.
404no such frameThe 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.
404no such element, stale element referenceThe frame element’s id is unknown, or the element is gone.

Switch to parent frame#

POST /session/{sessionId}/frame/parent

Not run on a real app yet

Leaves the frame entered last for its parent. In the top page it does nothing.

sessionIdstringrequired#

The current session’s id.

valuenullrequired#

null.