Module

x/puppeteer/mod.ts>IsolatedWorld

A port of puppeteer running on Deno
Latest
class IsolatedWorld
import { IsolatedWorld } from "https://dotland.deno.dev/x/puppeteer@16.2.0/mod.ts";

Constructors

new
IsolatedWorld(
client: CDPSession,
frameManager: FrameManager,
frame: Frame,
timeoutSettings: TimeoutSettings,
)

Properties

readonly
_boundFunctions: Map<string, Function>
readonly
_waitTasks: Set<WaitTask>

Methods

_addBindingToContext(context: ExecutionContext, name: string): Promise<void>
_detach(): void
_waitForSelectorInPage(
queryOne: Function,
selector: string,
options: WaitForSelectorOptions,
binding?: PageBinding,
): Promise<ElementHandle<any> | null>
$<Selector extends string>(selector: Selector): Promise<ElementHandle<NodeFor<Selector>> | null>
$$<Selector extends string>(selector: Selector): Promise<Array<ElementHandle<NodeFor<Selector>>>>
$$eval<Selector extends string, Params extends unknown[], Func extends EvaluateFunc<[Array<NodeFor<Selector>>, ...Params]> = EvaluateFunc<[Array<NodeFor<Selector>>, ...Params]>>(
selector: Selector,
pageFunction: Func | string,
...args: Params,
): Promise<Awaited<ReturnType<Func>>>
$eval<Selector extends string, Params extends unknown[], Func extends EvaluateFunc<[ElementHandle<NodeFor<Selector>>, ...Params]> = EvaluateFunc<[ElementHandle<NodeFor<Selector>>, ...Params]>>(
selector: Selector,
pageFunction: Func | string,
...args: Params,
): Promise<Awaited<ReturnType<Func>>>
$x(expression: string): Promise<Array<ElementHandle<any>>>
addScriptTag(options: { url?: string; path?: string; content?: string; id?: string; type?: string; }): Promise<ElementHandle<any>>

Adds a script tag into the current context.

addStyleTag(options: { url?: string; path?: string; content?: string; }): Promise<ElementHandle<any>>

Adds a style tag into the current context.

adoptBackendNode(backendNodeId?: Protocol.DOM.BackendNodeId): Promise<JSHandle<any>>
adoptHandle<T extends JSHandle<any>>(handle: T): Promise<T>
clearContext(): void
click(selector: string, options: { delay?: number; button?: MouseButton; clickCount?: number; }): Promise<void>
content(): Promise<string>
document(): Promise<ElementHandle<any>>
evaluate<Params extends unknown[], Func extends EvaluateFunc<Params> = EvaluateFunc<Params>>(pageFunction: Func | string, ...args: Params): Promise<Awaited<ReturnType<Func>>>
evaluateHandle<Params extends unknown[], Func extends EvaluateFunc<Params> = EvaluateFunc<Params>>(pageFunction: Func | string, ...args: Params): Promise<HandleFor<Awaited<ReturnType<Func>>>>
executionContext(): Promise<ExecutionContext>
focus(selector: string): Promise<void>
frame(): Frame
hasContext(): boolean
hover(selector: string): Promise<void>
select(selector: string, ...values: string[]): Promise<string[]>
setContent(html: string, options?: { timeout?: number; waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[]; }): Promise<void>
setContext(context: ExecutionContext): void
tap(selector: string): Promise<void>
title(): Promise<string>
type(
selector: string,
text: string,
options?: { delay: number; },
): Promise<void>
waitForFunction(
pageFunction: Function | string,
options?: { polling?: string | number; timeout?: number; },
...args: unknown[],
): Promise<JSHandle>
waitForSelector<Selector extends string>(selector: Selector, options: WaitForSelectorOptions): Promise<ElementHandle<NodeFor<Selector>> | null>
import IsolatedWorld
import { IsolatedWorld } from "https://dotland.deno.dev/x/puppeteer@16.2.0/mod.ts";

Copyright 2020 Google Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.