Skip to content

Commit 01482d2

Browse files
authored
docs: Update toml Doc for zh-cn (#2313)
Update toml Doc for zh-cn remove useless pageinfo of applicability and components
1 parent 66b3050 commit 01482d2

File tree

3 files changed

+25
-39
lines changed

3 files changed

+25
-39
lines changed

website_and_docs/content/documentation/grid/applicability.zh-cn.md

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,39 @@ title: "什么时候应该使用Grid"
33
linkTitle: "适用性"
44
weight: 4
55
description: >
6-
Is Grid right for you?
6+
Grid适合您吗?
77
aliases: [
88
"/documentation/zh-cn/grid/when_to_use_grid/",
99
"/zh-cn/documentation/grid/when_to_use_grid"
1010
]
1111
---
1212

13-
{{% pageinfo color="warning" %}}
14-
<p class="lead">
15-
<i class="fas fa-language d-4"></i>
16-
Page being translated from English to Chinese.
17-
Do you speak Chinese? Help us to translate
18-
it by sending us pull requests!
19-
</p>
20-
{{% /pageinfo %}}
2113

2214
什么情况下可以使用 `Selenium Grid`
2315

2416
* 想要在不同的浏览器类型、浏览器版本和操作系统上并行运行测试时
2517
* 想要缩短执行测试案例所需的时间
2618

27-
`Selenium Grid` 可以并行地在多台计算机(称为节点)上运行测试案例对于大型和长时间运行的测试案例,这可以节省几分钟、几小时甚至几天的时间
19+
`Selenium Grid` 可以并行地在多台计算机(称为节点)上运行测试案例. 对于大型和长时间运行的测试案例,这可以节省几分钟、几小时甚至几天的时间.
2820

29-
这有效的缩短了测试结果的反馈时间,使得在测试的应用程序发生变化时能够更快地得到测试结果
21+
这有效的缩短了测试结果的反馈时间,使得在测试的应用程序发生变化时能够更快地得到测试结果.
3022

31-
`Grid` 可以并行地运行测试,支持多种不同的浏览器类型,并且可以同时运行多个相同浏览器的实例
23+
`Grid` 可以并行地运行测试,支持多种不同的浏览器类型,并且可以同时运行多个相同浏览器的实例.
3224

33-
举个例子,假设一个拥有六个节点的Grid第一台计算机拥有Firefox的最新版本,第二台拥有Firefox的上一个版本,第三台运行最新版Chrome,而其余三台机器是Mac Mini,允许在最新版本的Safari上并行运行三个测试
25+
举个例子,假设一个拥有六个节点的Grid. 第一台计算机拥有Firefox的最新版本,第二台拥有Firefox的上一个版本,第三台运行最新版Chrome,而其余三台机器是Mac Mini,允许在最新版本的Safari上并行运行三个测试.
3426

3527
执行时间可以用一个简单的公式来表示:
3628

3729
```测试次数 × 平均测试时间 / 节点数 = 总执行时间```
3830

39-
15 * 45s / 1 = 11m 15s // Without Grid
40-
15 * 45s / 5 = 2m 15s // Grid with 5 Nodes
41-
15 * 45s / 15 = 45s // Grid with 15 Nodes
42-
100 * 120s / 15 = 13m 20s // Would take over 3 hours without Grid
31+
15 * 45s / 1 = 11m 15s // 没有Grid
32+
15 * 45s / 5 = 2m 15s // 5节点的Grid
33+
15 * 45s / 15 = 45s // 15节点的Grid
34+
100 * 120s / 15 = 13m 20s // 如果没有Grid, 需要3个多小时
4335

44-
在测试案例执行时,`Grid` 会按照测试配置将测试分配到相应的浏览器上运行
36+
在测试案例执行时,`Grid` 会按照测试配置将测试分配到相应的浏览器上运行.
4537

46-
即使对于比较复杂的 `Selenium` 测试案例,这样的配置也可以极大地加快执行时间
38+
即使对于比较复杂的 `Selenium` 测试案例,这样的配置也可以极大地加快执行时间.
4739

48-
`Selenium Grid``Selenium` 项目中的重要组成部分,由同一团队的核心Selenium开发人员并行维护。由于意识到测试执行速度的重要性,`Grid` 自设计之初就成为 `Selenium` 项目的关键部分。
40+
`Selenium Grid``Selenium` 项目中的重要组成部分,由同一团队的核心Selenium开发人员并行维护.
41+
由于意识到测试执行速度的重要性,`Grid` 自设计之初就成为 `Selenium` 项目的关键部分.

website_and_docs/content/documentation/grid/components.zh-cn.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@ aliases: [
1010
]
1111
---
1212

13-
{{% pageinfo color="warning" %}}
14-
<p class="lead">
15-
<i class="fas fa-language d-4"></i>
16-
Page being translated from
17-
English to Chinese. Do you speak Chinese? Help us to translate
18-
it by sending us pull requests!
19-
</p>
20-
{{% /pageinfo %}}
2113

2214
Selenium Grid 4 是对以前版本的彻底重写。除了对性能和标准合规性进行全面改进外,还分解了 `Grid` 的不同功能以反映更现代的计算和软件开发时代。 Selenium Grid 4 专为容器化和云分布式可扩展性而构建,是现代时代的全新解决方案。
2315

website_and_docs/content/documentation/grid/configuration/toml_options.zh-cn.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ webdriver-executable = '/path/to/chromedriver/95/chromedriver'
110110
则最多有2个并发会话.
111111
原型配置需要映射一个Docker映像,
112112
Docker的守护进程需要通过http/tcp公开.
113-
此外可以通过 `devices` 属性定义在主机上可访问的哪些设备文件将在容器中可用
114-
有关 docker 设备映射如何工作的更多信息请参阅 [docker](https://docs.docker.com/engine/reference/commandline/run/#add-host-device-to-container---device) 文档
113+
此外, 可以通过 `devices` 属性定义在主机上可访问的哪些设备文件将在容器中可用.
114+
有关 docker 设备映射如何工作的更多信息, 请参阅 [docker](https://docs.docker.com/engine/reference/commandline/run/#add-host-device-to-container---device) 文档.
115115

116116
```toml
117117
[node]
@@ -182,12 +182,11 @@ HttpCommandExecutor executor = new HttpCommandExecutor(clientConfig);
182182
RemoteWebDriver driver = new RemoteWebDriver(executor, new ChromeOptions());
183183
```
184184

185-
In other languages, you can use the URL http://admin:myStrongPassword@localhost:4444
185+
在其他语言中, 您可以使用 URL http://admin:myStrongPassword@localhost:4444
186186

187-
### Setting custom capabilities for matching specific Nodes
187+
### 为匹配特定节点设置自定义功能
188188

189-
**Important:** Custom capabilities need to be set in the configuration in all Nodes. They also
190-
need to be included always in every session request.
189+
**重要提示:** 自定义功能需要在所有节点的配置中进行设置. 并且在每次会话请求中都必须包含这些功能.
191190

192191
```toml
193192
[node]
@@ -199,7 +198,7 @@ stereotype = '{"browserName": "firefox", "platformName": "macOS", "browserVersio
199198
max-sessions = 5
200199
```
201200

202-
Here is a Java example showing how to match that Node
201+
这里有一个 Java 示例, 展示了如何匹配那个节点
203202

204203
```java
205204
FirefoxOptions options = new FirefoxOptions();
@@ -212,14 +211,16 @@ driver.get("https://selenium.dev");
212211
driver.quit();
213212
```
214213

215-
### Enabling Managed downloads by the Node.
214+
### 启用节点的托管下载功能.
216215

217-
The Node can be instructed to manage downloads automatically. This will cause the Node to save all files that were downloaded for a particular session into a temp directory, which can later be retrieved from the node.
218-
To turn this capability on, use the below configuration:
216+
节点可以被设置为自动管理下载.
217+
这将导致节点会把特定会话中下载的所有文件保存到一个临时目录中,
218+
之后可以从节点中获取这些文件.
219+
要启用此功能, 请使用以下配置:
219220

220221
```toml
221222
[node]
222223
enable-managed-downloads = true
223224
```
224225

225-
Refer to the [CLI section]({{< ref "cli_options.md#enabling-managed-downloads-by-the-node" >}}) for a complete example.
226+
有关完整示例, 请参阅[CLI章节]({{< ref "cli_options.md#enabling-managed-downloads-by-the-node" >}}) .

0 commit comments

Comments
 (0)