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