Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c4fad4a

Browse files
Update chrome.zh-cn.md (SeleniumHQ#1309)[deploy site]
* Update chrome.zh-cn.md * Update chrome.zh-cn.md doc: 拓展 => 扩展 --------- Co-authored-by: Sri Harsha <[email protected]>
1 parent 4b0173a commit c4fad4a

File tree

1 file changed

+25
-28
lines changed

1 file changed

+25
-28
lines changed

website_and_docs/content/documentation/webdriver/browsers/chrome.zh-cn.md

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@ aliases: [
99
]
1010
---
1111

12-
By default, Selenium 4 is compatible with Chrome v75 and greater. Note that the version of
13-
the Chrome browser and the version of chromedriver must match the major version.
12+
默认情况下,Selenium 4与Chrome v75及更高版本兼容. 但是请注意Chrome浏览器的版本与chromedriver的主版本需要匹配.
1413

1514
## Options
1615

17-
Capabilities common to all browsers are described on the [Options page]({{< ref "../drivers/options.md" >}}).
16+
所有浏览器的通用功能请看这 [Options page]({{< ref "../drivers/options.md" >}}).
1817

19-
Capabilities unique to Chrome can be found at Google's page for [Capabilities & ChromeOptions](https://chromedriver.chromium.org/capabilities)
18+
Chrome浏览器的特有功能可以在谷歌的页面找到: [Capabilities & ChromeOptions](https://chromedriver.chromium.org/capabilities)
2019

21-
Starting a Chrome session with basic defined options looks like this:
20+
基于默认选项的Chrome浏览器会话看起来是这样:
2221

2322
{{< tabpane code=false langEqualsHeader=true >}}
2423
{{< tab header="Java" >}}
@@ -41,15 +40,14 @@ Starting a Chrome session with basic defined options looks like this:
4140
{{< /tab >}}
4241
{{< /tabpane >}}
4342

44-
Here are a few common use cases with different capabilities:
43+
下面是一些不同功能的常见示例:
4544

46-
### Arguments
45+
### 参数
4746

48-
The `args` parameter is for a list of [Command Line Switches](https://peter.sh/experiments/chromium-command-line-switches/)
49-
used when starting the browser.
50-
Commonly used args include `--start-maximized` and `--headless=new`
47+
`args` 参数是启动浏览器时输入的[浏览器命令行参数](https://peter.sh/experiments/chromium-command-line-switches/).
48+
常用的参数包括 `--start-maximized``--headless=new`
5149

52-
Add an argument to options:
50+
添加一个参数到选项中:
5351

5452
{{< tabpane code=false langEqualsHeader=true >}}
5553
{{< tab header="Java" >}}
@@ -72,12 +70,11 @@ Add an argument to options:
7270
{{< /tab >}}
7371
{{< /tabpane >}}
7472

75-
### Start browser in a specified location
73+
### 从指定位置启动浏览器
7674

77-
The `binary` parameter takes the path of an alternate location of browser to use. With this parameter you can
78-
use chromedriver to drive various Chromium based browsers.
75+
`binary` 参数接收一个使用浏览器的备用路径,通过这个参数你可以使用chromedriver 去驱动各种基于Chromium 内核的浏览器.
7976

80-
Add a browser location to options:
77+
添加一个浏览器地址到选项中:
8178

8279
{{< tabpane code=false langEqualsHeader=true >}}
8380
{{< tab header="Java" >}}
@@ -100,19 +97,19 @@ Add a browser location to options:
10097
{{< /tab >}}
10198
{{< /tabpane >}}
10299

103-
### Add extensions
100+
### 添加扩展程序
104101

105-
The `extensions` parameter accepts crx files
102+
`extensions` 参数接受crx文件
106103

107-
Add an extension to options:
104+
添加一个扩展程序到选项中:
108105

109106
{{< alert-code />}}
110107

111-
### Keeping browser open
108+
### 保持浏览器的打开状态
112109

113-
Setting the `detach` parameter to true will keep the browser open after the driver process has been quit.
110+
`detach` 参数设置为true将在驱动过程结束后保持浏览器的打开状态.
114111

115-
Ad a binary to options:
112+
添加一个布尔值到选项中:
116113

117114
{{< tabpane code=false langEqualsHeader=true >}}
118115
{{< tab header="Java" >}}
@@ -135,12 +132,12 @@ Ad a binary to options:
135132
{{< /tab >}}
136133
{{< /tabpane >}}
137134

138-
### Excluding arguments
135+
### 排除的参数
139136

140-
Chrome adds various arguments, if you do not want those arguments added, pass them into `excludeSwitches`.
141-
A common example is to turn the popup blocker back on.
137+
Chrome 添加了各种参数,如果你不希望添加某些参数,可以将其传入 `excludeSwitches`.
138+
一个常见的例子是重新打开弹出窗口阻止程序.
142139

143-
Set excluded arguments on options:
140+
设置排除参数至选项中:
144141

145142
{{< tabpane code=false langEqualsHeader=true >}}
146143
{{< tab header="Java" >}}
@@ -165,13 +162,13 @@ Set excluded arguments on options:
165162

166163
## Casting
167164

168-
You can drive Chrome Cast devices, including sharing tabs
165+
你可以驱动 Chrome Cast 设备,包括共享选项卡
169166

170167
{{< alert-code />}}
171168

172-
## Network conditions
169+
## 网络条件
173170

174-
You can simulate various network conditions.
171+
您可以模拟各种网络条件.
175172

176173
{{< alert-code />}}
177174

0 commit comments

Comments
 (0)