下载文件
通过使用 downloadFile 命令,将运行 Selenium 节点的远程计算机上的文件下载到本地文件系统。
信息
请注意,此命令仅在您使 用 Selenium Grid 且浏览器为 Chrome、Edge 或 Firefox,并且在 capabilities 中设置了 se:downloadsEnabled 标志时才受支持。
用法
browser.downloadFile(fileName, targetDirectory)
参数
| 名称 | 类型 | 详情 |
|---|---|---|
fileName | string | 文件的远程路径 |
targetDirectory | string | 本地计算机上的目标位置 |