2017-02-11 38 views

回答

1

該文件將在default download location土地從谷歌瀏覽器... 除非在代碼中設置顯式DesiredCapabilitiesChromeOptions如圖所示here

下載文件夾的默認位置。
* nix系統:

String location = System.getProperty("user.dir") + "/Downloads"; 

的Windows:

String location = System.getProperty("user.dir") + "\\Downloads"; 
+0

有沒有辦法讓代碼的默認文件夾? –

+0

Windows *中* nix系統和'System.getProperty(「user.dir」)+「\\ Downloads」的默認位置是'System.getProperty(「user.dir」)+「/ Downloads」。 –

相關問題