Skip to content

Latest commit

 

History

History
68 lines (39 loc) · 1.06 KB

page.md

File metadata and controls

68 lines (39 loc) · 1.06 KB

getId

Get page id

Returns String

getName

Get page name

Returns String

setName

Update page name

Parameters

Examples

page.setName('New name');

getAllFrames

Get all frames

Examples

const arrayOfFrames = page.getAllFrames();

Returns Array<Frame>

getMainFrame

Get the first frame of the page (identified always as the main one)

Examples

const mainFrame = page.getMainFrame();

Returns Frame

getMainComponent

Get the root component (usually is the wrapper component) from the main frame

Examples

const rootComponent = page.getMainComponent();
console.log(rootComponent.toHTML());

Returns Component