downloadFile
使用 downloadFile
指令將遠端電腦上執行 Selenium 節點的檔案下載到本機檔案系統。
資訊
請注意,只有在使用具有 Chrome、Edge 或 Firefox 的 Selenium Grid,並在 capabilities 中設定 se:downloadsEnabled
旗標時,才支援此指令。
用法
browser.downloadFile(fileName, targetDirectory)
參數
名稱 | 類型 | 詳細資訊 |
---|---|---|
fileName | 字串 | 檔案的遠端路徑 |
targetDirectory | 字串 | 本機電腦上的目標位置 |