Skip to main content
Version: 23.2.0

Frame.setContent() 方法

¥Frame.setContent() method

设置框架的内容。

¥Set the content of the frame.

签名

¥Signature

class Frame {
abstract setContent(html: string, options?: WaitForOptions): Promise<void>;
}

参数

¥Parameters

范围

类型

描述

html

string

要分配给页面的 HTML 标记。

options

WaitForOptions

(可选的)用于配置超时前多长时间以及何时认为内容设置成功的选项。

Returns:

Promise<void>