Skip to content

Commit 83568d4

Browse files
authored
Update Chinese translation of "install_library.zh-cn.md" (#1004)
[deploy site]
1 parent f4cb91c commit 83568d4

File tree

1 file changed

+33
-25
lines changed

1 file changed

+33
-25
lines changed

website_and_docs/content/documentation/webdriver/getting_started/install_library.zh-cn.md

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
title: "安装浏览器驱动"
33
linkTitle: "安装类库"
44
weight: 2
5-
needsTranslation: true
65
description: >
76
配置自动化的浏览器.
87
aliases: [
@@ -74,23 +73,27 @@ Install-Package Selenium.WebDriver
7473
# or using .Net CLI
7574
dotnet add package Selenium.WebDriver
7675
```
77-
## Supported .NET Versions
78-
Make sure to use the .NET SDK version compatible with relevant [Selenium package](https://www.nuget.org/packages/Selenium.WebDriver).
79-
Check the dependencies section to find out the [supported .NET version](https://dotnet.microsoft.com/en-us/download/dotnet).
80-
At the time of this update, .NET 5.0 (Visual Studio 2019) is known to be supported, and .NET 6.0 is not supported.
81-
You can download [MSBuild Tools 2019 from here](https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio?view=vs-2019)
82-
to install the needed components and dependencies such as .NET SDK and NuGet Package Manager.
83-
84-
## Using Visual Studio Code (vscode) and C#
85-
This is a quick guide to help you get started with vscode and C#, however, more research may be required.
86-
Install the compatible .NET SDK as per the section above.
87-
Also install the vscode extensions (Ctrl-Shift-X) for C# and NuGet.
88-
Follow the [instruction here](https://docs.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio-code?pivots=dotnet-5-0)
89-
to create and run the "Hello World" console project using C#.
90-
You may also create a NUnit starter project using the command line `dotnet new NUnit`.
91-
Make sure the file `%appdata%\NuGet\nuget.config` is configured properly as some developers reported that it will be empty due to some issues.
92-
If `nuget.config` is empty, or not configured properly, then .NET builds will fail for Selenium Projects.
93-
Add the following section to the file `nuget.config` if it is empty:
76+
## 支持的 .NET 版本
77+
确保使用与.NET SDK版本兼容的相关[Selenium包](https://www.nuget.org/packages/Selenium.WebDriver).
78+
检查依赖的部分用以找出[支持的 .NET 版本](https://dotnet.microsoft.com/en-us/download/dotnet).
79+
在本次升级时, .NET 5.0 (Visual Studio 2019) 是已知的被支持的版本, 并且 .NET 6.0 并未支持.
80+
您可以下载 [MSBuild Tools 2019 于此](https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio?view=vs-2019)
81+
以安装所需的组件和依赖项, 例如 .NET SDK 和 NuGet 包管理器.
82+
83+
## 使用 Visual Studio Code (vscode) 以及 C#
84+
这是一个快速指南, 可帮助您开始使用 vscode 和 C#, 但可能需要进行更多调研.
85+
按照上一节安装兼容的 .NET SDK.
86+
还要安装适用于 C# 和 NuGet 的 vscode 扩展 (Ctrl-Shift-X).
87+
参考 [此处指令](https://docs.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio-code?pivots=dotnet-5-0)
88+
创建并且使用C#运行 "Hello World" 的控制台项目.
89+
您也可以使用命令行 `dotnet new NUnit`创建一个 NUnit 初创项目.
90+
确保文件 `%appdata%\NuGet\nuget.config` 已正确配置,
91+
因为某些开发人员报告说,
92+
由于某些问题, 该文件将为空.
93+
如果 `nuget.config` 为空,
94+
或者未正确配置,
95+
则Selenium项目的.NET构建将失败.
96+
将以下部分添加到文件 `nuget.config` (如果为空) :
9497
```
9598
9699
@@ -99,12 +102,17 @@ Add the following section to the file `nuget.config` if it is empty:
99102
100103
...
101104
```
102-
For more info about `nuget.config` [click here](https://docs.microsoft.com/en-us/nuget/reference/nuget-config-file).
103-
You may have to customize `nuget.config` to meet you needs.
105+
有关 `nuget.config` 的更多信息[点此](https://docs.microsoft.com/en-us/nuget/reference/nuget-config-file).
106+
你也可以自定义 `nuget.config` 以满足所需.
104107

105-
Now, go back to vscode, press Ctrl-Shift-P, and type "NuGet Add Package", and enter the required Selenium packages such as `Selenium.WebDriver`.
106-
Press Enter and select the version.
107-
Now you can use the examples in the documentation related to C# with vscode.
108+
现在, 返回 vscode, 按 Ctrl-Shift-P,
109+
然后键入"NuGet Add Package",
110+
然后输入所需的 Selenium 包,
111+
如"Selenium.WebDriver".
112+
113+
按 Enter 并选择版本.
114+
115+
现在, 您可以通过vscode与文档中 C# 相关示例结合使用.
108116

109117
{{< /tab >}}
110118
{{< tab header="Ruby" >}}
@@ -127,5 +135,5 @@ npm install selenium-webdriver
127135
{{< /tab >}}
128136
{{< /tabpane >}}
129137

130-
## Next Step
131-
[Install the browser drivers]({{< ref "install_drivers.md" >}})
138+
## 下一步
139+
[安装浏览器驱动]({{< ref "install_drivers.md" >}})

0 commit comments

Comments
 (0)