Browser.installExtension() 方法
🌐 Browser.installExtension() method
安装一个扩展并返回其 ID。在 Chrome 中,只有在浏览器使用 pipe: true 创建并设置了 --enable-unsafe-extension-debugging 标志时,此功能才可用。
🌐 Installs an extension and returns the ID. In Chrome, this is only available if the browser was created using pipe: true and the --enable-unsafe-extension-debugging flag is set.
语法
🌐 Signature
class Browser {
abstract installExtension(path: string): Promise<string>;
}
参数
🌐 Parameters
范围 🌐 Parameter | 类型 🌐 Type | 描述 🌐 Description |
|---|---|---|
path | string |
返回:
Promise<string>