Page.setContent() 方法
🌐 Page.setContent() method
设置页面的内容。
🌐 Set the content of the page.
语法
🌐 Signature
class Page {
setContent(html: string, options?: SetContentWaitForOptions): Promise<void>;
}
参数
🌐 Parameters
|
范围 🌐 Parameter |
类型 🌐 Type |
描述 🌐 Description |
|---|---|---|
|
html |
string |
要分配给页面的 HTML 标记。 🌐 HTML markup to assign to the page. |
|
options |
(可选) 具有某些属性的参数。 🌐 (Optional) Parameters that has some properties. |
返回:
Promise<void>