驱动服务类
服务类用于管理驱动程序的启动和停止. 它们不能与远程 WebDriver 会话一起使用.
服务类允许您指定有关驱动程序的信息, 诸如位置和要使用的端口. 它们还允许您指定传递哪些参数到命令行. 大多数有用的参数都与日志记录有关.
默认服务实例
使用默认服务实例启动驱动程序:
SELENIUM_CI_TOKEN not set
If you want to render content fetched from the GitHub API, please create a
personal access token
and set it as an environment variable named SELENIUM_CI_TOKEN. More information about token scopes can
be seen at
available scopes GitHub docs
SELENIUM_CI_TOKEN not set
If you want to render content fetched from the GitHub API, please create a
personal access token
and set it as an environment variable named SELENIUM_CI_TOKEN. More information about token scopes can
be seen at
available scopes GitHub docs
SELENIUM_CI_TOKEN not set
If you want to render content fetched from the GitHub API, please create a
personal access token
and set it as an environment variable named SELENIUM_CI_TOKEN. More information about token scopes can
be seen at
available scopes GitHub docs
SELENIUM_CI_TOKEN not set
If you want to render content fetched from the GitHub API, please create a
personal access token
and set it as an environment variable named SELENIUM_CI_TOKEN. More information about token scopes can
be seen at
available scopes GitHub docs
驱动程序位置
注意: 如果您使用的是 Selenium 4.6 或更高版本, 则无需设置驱动程序位置. 如果您无法更新 Selenium 或有高阶用法需求, 以下是指定驱动程序位置的方法:
SELENIUM_CI_TOKEN not set
If you want to render content fetched from the GitHub API, please create a
personal access token
and set it as an environment variable named SELENIUM_CI_TOKEN. More information about token scopes can
be seen at
available scopes GitHub docs
SELENIUM_CI_TOKEN not set
If you want to render content fetched from the GitHub API, please create a
personal access token
and set it as an environment variable named SELENIUM_CI_TOKEN. More information about token scopes can
be seen at
available scopes GitHub docs
SELENIUM_CI_TOKEN not set
If you want to render content fetched from the GitHub API, please create a
personal access token
and set it as an environment variable named SELENIUM_CI_TOKEN. More information about token scopes can
be seen at
available scopes GitHub docs
SELENIUM_CI_TOKEN not set
If you want to render content fetched from the GitHub API, please create a
personal access token
and set it as an environment variable named SELENIUM_CI_TOKEN. More information about token scopes can
be seen at
available scopes GitHub docs
驱动程序端口
如果希望驱动程序在特定端口上运行, 您可以在启动时指定端口号, 如下所示:
SELENIUM_CI_TOKEN not set
If you want to render content fetched from the GitHub API, please create a
personal access token
and set it as an environment variable named SELENIUM_CI_TOKEN. More information about token scopes can
be seen at
available scopes GitHub docs
SELENIUM_CI_TOKEN not set
If you want to render content fetched from the GitHub API, please create a
personal access token
and set it as an environment variable named SELENIUM_CI_TOKEN. More information about token scopes can
be seen at
available scopes GitHub docs
SELENIUM_CI_TOKEN not set
If you want to render content fetched from the GitHub API, please create a
personal access token
and set it as an environment variable named SELENIUM_CI_TOKEN. More information about token scopes can
be seen at
available scopes GitHub docs
SELENIUM_CI_TOKEN not set
If you want to render content fetched from the GitHub API, please create a
personal access token
and set it as an environment variable named SELENIUM_CI_TOKEN. More information about token scopes can
be seen at
available scopes GitHub docs
日志
日志记录功能因浏览器而异. 大多数浏览器都允许您指定日志的位置和级别. 请查看相应的浏览器页面:




