@@ -10,18 +10,20 @@ aliases: [
1010
1111--- 
1212
13- Selenium lets you automate browsers on remote computers if
14- there is a [ Selenium Grid] ({{< ref "../../grid" >}}) running on them. The computer that
15- executes the code is referred to as the client computer, and the computer with the browser and driver is 
16- referred to as the remote computer or sometimes as an end-node.
17- To direct Selenium tests to the remote computer, you need to use a Remote WebDriver class
18- and pass the URL including the port of the grid on that machine. Please see the grid documentation
19- for all the various ways the grid can be configured.
13+ 如果远程计算机上正在运行 [ Selenium Grid] ({{< ref "../../grid" >}}), 
14+ 则 Selenium 允许您自动化远程计算机上的浏览器.
15+ 执行代码的计算机称为客户端计算机, 
16+ 具有浏览器和驱动程序的计算机称为远程计算机, 
17+ 有时也称为终端节点.
18+ 要将 Selenium 测试指向到远程计算机, 
19+ 您需要使用 Remote WebDriver 类并传递包含该机器上网格端口的URL.
20+ 请参阅网格文档, 了解配置网格的全部方式.
2021
21- ## Basic Example  
22+ ## 基本样例  
2223
23- The driver needs to know where to send commands to and which browser to start on the Remote computer. So an address
24- and an options instance are both required.
24+ 驱动程序需要知道在远程计算机上向何处发送命令, 
25+ 以及启动哪个浏览器.
26+ 所以地址和选项实例都是必需的.
2527
2628{{< tabpane text=true >}}
2729{{< tab header="Java" >}}
@@ -45,15 +47,16 @@ and an options instance are both required.
4547{{< /tabpane >}}
4648
4749
48- ## Uploads  
50+ ## 上传  
4951
50- [ Uploading a file] ( )  is more complicated for Remote WebDriver sessions because the file you want to 
51- upload is likely on the computer executing the code, but the driver on the
52- remote computer is looking for the provided path on its local file system.
53- The solution is to use a Local File Detector. When one is set, Selenium will bundle
54- the file, and send it to the remote machine, so the driver can see the reference to it.
55- Some bindings include a basic local file detector by default, and all of them allow 
56- for a custom file detector.
52+ 对于远程WebDriver会话, [ 上传文件] ({{< ref "../elements/file_upload" >}}) 更为复杂, 
53+ 因为要上传的文件可能在执行代码的计算机上, 
54+ 但远程计算机上的驱动程序正在其本地文件系统上查找提供的路径.
55+ 解决方案是使用本地文件检测器.
56+ 设置一个后, Selenium将捆绑文件, 
57+ 并将其发送到远程计算机, 以便驱动程序可以看到对它的引用.
58+ 默认情况下, 某些实现包含一个基本的本地文件检测器, 
59+ 并且所有这些实现都允许自定义文件检测器.
5760
5861{{< tabpane text=true >}}
5962{{< tab header="Java" >}}
@@ -81,24 +84,24 @@ Ruby adds a local file detector to remote webdriver instances by default, but yo
8184{{< /tabpane >}}
8285
8386
84- ## Downloads  
87+ ## 下载  
8588
86- Chrome, Edge and Firefox each allow you to set the location of the download directory .
87- When you do this on a remote computer, though, the location is on the remote computer's local file system.  
88- Selenium allows you to enable downloads to get these files onto the client computer .
89+ Chrome、Edge和Firefox都允许您设置下载目录的位置 .
90+ 但是, 当您在远程计算机上执行此操作时, 位置在远程计算机的本地文件系统上. 
91+ Selenium允许您启用下载功能, 将这些文件下载到客户端计算机上 .
8992
90- ### Enable Downloads in the Grid  
93+ ### 在网格中启用下载  
9194
92- Regardless of the client, when starting the grid in node or standalone mode , 
93- you must add the flag : 
95+ 当以节点或独立模式启动网格时 , 
96+ 你必须添加参数 : 
9497``` 
9598--enable-managed-downloads true 
9699```  
97100
98- ### Enable Downloads in the Client  
101+ ### 在客户端中启用下载  
99102
100- The grid uses the  ` se:downloadsEnabled `  capability to toggle whether to be responsible for managing the browser location .
101- Each of the bindings have a method in the options class to set this .
103+ 网格使用  ` se:downloadsEnabled `  功能来切换是否负责管理浏览器位置 .
104+ 每个实现在options类中都有一个方法来设置 .
102105
103106{{< tabpane text=true >}}
104107{{< tab header="Java" >}}
@@ -121,10 +124,10 @@ Each of the bindings have a method in the options class to set this.
121124{{< /tab >}}
122125{{< /tabpane >}}
123126
124- ### List Downloadable Files  
127+ ### 列出可下载文件  
125128
126- Be aware that Selenium is not waiting for files to finish downloading , 
127- so the list is an immediate snapshot of what file names are currently in the directory for the given session .
129+ 请注意, Selenium不会等待文件下载完成 , 
130+ 因此, 该列表是给定会话目录中当前文件名的即时快照 .
128131
129132{{< tabpane text=true >}}
130133{{< tab header="Java" >}}
@@ -147,9 +150,10 @@ so the list is an immediate snapshot of what file names are currently in the dir
147150{{< /tab >}}
148151{{< /tabpane >}}
149152
150- ### Download a File  
153+ ### 下载文件  
151154
152- Selenium looks for the name of the provided file in the list and downloads it to the provided target directory.
155+ Selenium在列表中查找提供的文件的名称, 
156+ 并将其下载到提供的目标目录.
153157
154158{{< tabpane text=true >}}
155159{{< tab header="Java" >}}
@@ -172,10 +176,10 @@ Selenium looks for the name of the provided file in the list and downloads it to
172176{{< /tab >}}
173177{{< /tabpane >}}
174178
175- ### Delete Downloaded Files  
179+ ### 删除已下载的文件  
176180
177- By default, the download directory is deleted at the end of the applicable session, 
178- but you can also delete all files during the session .
181+ 默认情况下, 下载目录在可用会话结束时被删除,  
182+ 但您也可以在会话期间删除所有文件 .
179183
180184{{< tabpane text=true >}}
181185{{< tab header="Java" >}}
@@ -199,10 +203,10 @@ but you can also delete all files during the session.
199203{{< /tabpane >}}
200204
201205
202- ## Browser specific functionalities  
206+ ## 浏览器特定功能  
203207
204- Each  [ browser ] ({{< ref "../browsers/" >}}) has implemented special functionality that is available only to that browser .
205- Each of the Selenium bindings has implemented a different way to use those features in a Remote Session 
208+ 每个 [ 浏览器 ] ({{< ref "../browsers/" >}}) 都实现了仅对该浏览器可用的特殊功能 .
209+ 每种Selenium实现都实现了在远程会话中使用这些功能的不同方式 
206210
207211{{< tabpane text=true >}}
208212{{% tab header="Java" %}}
0 commit comments