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
范围 | 类型 | 描述 |
---|---|---|
path | string |
Returns:
Promise<string>