Skip to content

Commit bf642bd

Browse files
authored
update feature/service (#1790)
* update feature/service * update feature/service
1 parent 74ff607 commit bf642bd

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

website_and_docs/content/documentation/webdriver/drivers/service.zh-cn.md

+20-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
title: "Driver Service Class"
2+
title: "驱动服务类"
33
linkTitle: "服务"
44
weight: 3
55
---
66

77
服务类用于管理驱动程序的启动和停止.
8-
They can not be used with a Remote WebDriver session.
8+
它们不能与远程 WebDriver 会话一起使用.
99

10-
Service classes allow you to specify information about the driver,
11-
like location and which port to use.
12-
They also let you specify what arguments get passed
13-
to the command line. Most of the useful arguments are related to logging.
10+
服务类允许您指定有关驱动程序的信息,
11+
诸如位置和要使用的端口.
12+
它们还允许您指定传递哪些参数到命令行.
13+
大多数有用的参数都与日志记录有关.
1414

15-
## Default Service instance
15+
## 默认服务实例
1616

17-
To start a driver with a default service instance:
17+
使用默认服务实例启动驱动程序:
1818

1919
{{< tabpane text=true >}}
2020
{{< tab header="Java" >}}
@@ -38,10 +38,12 @@ To start a driver with a default service instance:
3838
{{< /tab >}}
3939
{{< /tabpane >}}
4040

41-
## Driver location
41+
## 驱动程序位置
4242

43-
**Note:** If you are using Selenium 4.6 or greater, you shouldn't need to set a driver location.
44-
If you can not update Selenium or have an advanced use case here is how to specify the driver location:
43+
**注意:** 如果您使用的是 Selenium 4.6 或更高版本,
44+
则无需设置驱动程序位置.
45+
如果您无法更新 Selenium 或有高阶用法需求,
46+
以下是指定驱动程序位置的方法:
4547

4648
{{< tabpane text=true >}}
4749
{{< tab header="Java" >}}
@@ -67,9 +69,10 @@ If you can not update Selenium or have an advanced use case here is how to speci
6769
{{< /tab >}}
6870
{{< /tabpane >}}
6971

70-
## Driver port
72+
## 驱动程序端口
7173

72-
If you want the driver to run on a specific port, you may specify it as follows:
74+
如果希望驱动程序在特定端口上运行,
75+
您可以在启动时指定端口号, 如下所示:
7376

7477
{{< tabpane text=true >}}
7578
{{< tab header="Java" >}}
@@ -95,10 +98,11 @@ If you want the driver to run on a specific port, you may specify it as follows:
9598
{{< /tabpane >}}
9699

97100
<span id="setting-log-output"></span>
98-
## Logging
101+
## 日志
99102

100-
Logging functionality varies between browsers. Most browsers allow you to
101-
specify location and level of logs. Take a look at the respective browser page:
103+
日志记录功能因浏览器而异.
104+
大多数浏览器都允许您指定日志的位置和级别.
105+
请查看相应的浏览器页面:
102106
* [Chrome]({{< ref "../browsers/chrome#service" >}})
103107
* [Edge]({{< ref "../browsers/edge#service" >}})
104108
* [Firefox]({{< ref "../browsers/firefox#service" >}})

0 commit comments

Comments
 (0)