DOMWorld
Constructor Summary
Public Constructor | ||
public |
constructor(frameManager: FrameManager, frame: Frame, timeoutSettings: TimeoutSettings) |
Member Summary
Private Members | ||
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
_frame: * |
|
private |
|
|
private |
|
|
private |
|
Method Summary
Public Methods | ||
public |
async $(selector: string): Promise<ElementHandle> |
|
public |
async $$(selector: string): Promise<Array<ElementHandle>> |
|
public |
|
|
public |
|
|
public |
async $x(expression: string): Promise<Array<ElementHandle>> |
|
public |
async addScriptTag(options: {url: ?string, path: ?string, content: ?string, type: ?string}): Promise<ElementHandle> |
|
public |
async addStyleTag(options: {url: ?string, path: ?string, content: ?string}): Promise<ElementHandle> |
|
public |
async click(selector: string, options: {delay?: number, button?: "left"|"right"|"middle", clickCount?: number}=) |
|
public |
|
|
public |
|
|
public |
async evaluateHandle(pageFunction: Function | string, args: ...*): Promise<JSHandle> |
|
public |
|
|
public |
|
|
public |
|
|
public |
async getElementById(elemId: string): Promise<ElementHandle|undefined> |
since chrome-remote-interface-extra |
public |
|
|
public |
querySelector(selector: string): Promise<ElementHandle> |
|
public |
querySelectorAll(selector: string): Promise<Array<ElementHandle>> |
|
public |
querySelectorAllEval(selector: string, pageFunction: Function | String, args: ...*): Promise<Object> |
|
public |
|
|
public |
|
|
public |
async setContent(html: string, options: {timeout?: number, waitUntil?: string|Array<string>}=) |
|
public |
|
|
public |
|
|
public |
|
|
public |
waitForFunction(pageFunction: Function | string, options: {polling?: string|number, timeout?: number}=, args: ...*): Promise<JSHandle> |
|
public |
waitForSelector(selector: string, options: {visible?: boolean, hidden?: boolean, timeout?: number}=): Promise<ElementHandle> |
|
public |
waitForXPath(xpath: string, options: {visible?: boolean, hidden?: boolean, timeout?: number}=): Promise<ElementHandle> |
|
public |
xpathQuery(expression: string): Promise<Array<ElementHandle>> |
Private Methods | ||
private |
_detach() |
|
private |
|
|
private |
_setContext(context: ExecutionContext) |
|
private |
async _waitForSelectorOrXPath(selectorOrXPath: string, isXPath: boolean, options: {visible?: boolean, hidden?: boolean, timeout?: number}=): Promise<ElementHandle> |
Public Constructors
public constructor(frameManager: FrameManager, frame: Frame, timeoutSettings: TimeoutSettings) source
Params:
Name | Type | Attribute | Description |
frameManager | FrameManager |
|
|
frame | Frame |
|
|
timeoutSettings | TimeoutSettings |
|
Private Members
private _contextPromise: Promise<ExecutionContext> source
private _contextResolveCallback: * source
private _documentPromise: Promise<ElementHandle> source
private _frame: * source
private _frameManager: * source
private _timeoutSettings: * source
Public Methods
public async $(selector: string): Promise<ElementHandle> source
Params:
Name | Type | Attribute | Description |
selector | string |
public async $$(selector: string): Promise<Array<ElementHandle>> source
Params:
Name | Type | Attribute | Description |
selector | string |
public async $$eval(selector: string, pageFunction: Function | string, args: ...*): Promise<Object> source
public async $eval(selector: string, pageFunction: Function | string, args: ...*): Promise<Object> source
public async $x(expression: string): Promise<Array<ElementHandle>> source
Params:
Name | Type | Attribute | Description |
expression | string |
public async addScriptTag(options: {url: ?string, path: ?string, content: ?string, type: ?string}): Promise<ElementHandle> source
public async addStyleTag(options: {url: ?string, path: ?string, content: ?string}): Promise<ElementHandle> source
public async click(selector: string, options: {delay?: number, button?: "left"|"right"|"middle", clickCount?: number}=) source
Params:
Name | Type | Attribute | Description |
selector | string | ||
options | {delay?: number, button?: "left"|"right"|"middle", clickCount?: number}= |
|
public executionContext(): Promise<ExecutionContext> source
public async getElementById(elemId: string): Promise<ElementHandle|undefined> since chrome-remote-interface-extra source
Params:
Name | Type | Attribute | Description |
elemId | string |
public querySelector(selector: string): Promise<ElementHandle> source
Params:
Name | Type | Attribute | Description |
selector | string |
public querySelectorAll(selector: string): Promise<Array<ElementHandle>> source
Params:
Name | Type | Attribute | Description |
selector | string |
public querySelectorAllEval(selector: string, pageFunction: Function | String, args: ...*): Promise<Object> source
public querySelectorEval(selector: string, pageFunction: Function | String, args: ...*): Promise<Object> source
public async setContent(html: string, options: {timeout?: number, waitUntil?: string|Array<string>}=) source
Params:
Name | Type | Attribute | Description |
html | string | ||
options | {timeout?: number, waitUntil?: string|Array<string>}= |
|
public waitForFunction(pageFunction: Function | string, options: {polling?: string|number, timeout?: number}=, args: ...*): Promise<JSHandle> source
public waitForSelector(selector: string, options: {visible?: boolean, hidden?: boolean, timeout?: number}=): Promise<ElementHandle> source
Params:
Name | Type | Attribute | Description |
selector | string | ||
options | {visible?: boolean, hidden?: boolean, timeout?: number}= |
|
public waitForXPath(xpath: string, options: {visible?: boolean, hidden?: boolean, timeout?: number}=): Promise<ElementHandle> source
Params:
Name | Type | Attribute | Description |
xpath | string | ||
options | {visible?: boolean, hidden?: boolean, timeout?: number}= |
|
public xpathQuery(expression: string): Promise<Array<ElementHandle>> source
Params:
Name | Type | Attribute | Description |
expression | string |
Private Methods
private _detach() source
private _setContext(context: ExecutionContext) source
Params:
Name | Type | Attribute | Description |
context | ExecutionContext |
|