Frame.setContent() 方法
🌐 Frame.setContent() method
设置框架的内容。
🌐 Set the content of the frame.
语法
🌐 Signature
class Frame {
abstract setContent(html: string, options?: WaitForOptions): Promise<void>;
}
参数
🌐 Parameters
范围 🌐 Parameter | 类型 🌐 Type | 描述 🌐 Description |
|---|---|---|
html | string | 要分配给页面的 HTML 标记。 🌐 HTML markup to assign to the page. |
options | (可选) 配置在超时之前等待多久以及在何种情况下将内容设置视为成功的选项。 🌐 (Optional) Options to configure how long before timing out and at what point to consider the content setting successful. |
返回:
Promise<void>