跳至主要內容

downloadFile

使用 downloadFile 指令將遠端電腦上執行 Selenium 節點的檔案下載到本機檔案系統。

資訊

請注意,只有在使用具有 Chrome、Edge 或 Firefox 的 Selenium Grid,並在 capabilities 中設定 se:downloadsEnabled 旗標時,才支援此指令。

用法
browser.downloadFile(fileName, targetDirectory)
參數
名稱類型詳細資訊
fileName字串檔案的遠端路徑
targetDirectory字串本機電腦上的目標位置

歡迎!我能如何幫你?

WebdriverIO AI Copilot