Skip to main content
Version: 23.8.0

Browser.version() 方法

¥Browser.version() method

获取表示此 浏览器的 名称和版本的字符串。

¥Gets a string representing this browser's name and version.

对于无头浏览器,这与 "HeadlessChrome/61.0.3153.0" 类似。对于非无头或新无头,这与 "Chrome/61.0.3153.0" 类似。对于 Firefox,它与 "Firefox/116.0a1" 类似。

¥For headless browser, this is similar to "HeadlessChrome/61.0.3153.0". For non-headless or new-headless, this is similar to "Chrome/61.0.3153.0". For Firefox, it is similar to "Firefox/116.0a1".

Browser.version() 的格式可能会随着浏览器的未来版本而改变。

¥The format of Browser.version() might change with future releases of browsers.

签名

¥Signature

class Browser {
abstract version(): Promise<string>;
}

Returns:

Promise<string>