1 個回答
- 最新
- 最多得票
- 最多評論
0
Hi,
You can download the files you need for your testing under "C:\Users\testnode" then re-use them in your tests. A discussion can be seen here previously in the AWS forums -> https://forums.aws.amazon.com/thread.jspa?threadID=335509&tstart=0
If the forums are no longer accessible here is the answer of my colleague on that post:
Currently, you can save files to the folder "C:\Users\testnode"
Example in Chrome:
String remoteDownloadDirectory = "C:\Users\testnode";
Map<String, Object> preferences = new HashMap<String, Object>();
preferences.put("download.default_directory", remoteDownloadDirectory);
preferences.put("profile.default_content_settings.popups", 0);
ChromeOptions option = new ChromeOptions();
option.setExperimentalOption("prefs", preferences);
Example in Firefox
String remoteDownloadDirectory = "C:\Users\testnode";
FirefoxOptions options = new FirefoxOptions();
options.addPreference("browser.download.dir", remoteDownloadDirectory);
options.addPreference("browser.download.folderList", 2);
// To make sure you aren't prompted to save the file, tell firefox which mime-types to automatically download
options.addPreference("browser.helperApps.neverAsk.saveToDisk", "text/plain");
Please do let us know if this does not answer your query and I will check with the team.
相關內容
- 已提問 6 個月前
- AWS 官方已更新 2 年前
Hello Ryan, Thank you so much. I would like to know if there is an equivalent function in JS instead of setExperimentalOption as I'm using it along with Nightwatch for testing.
I have some files on S3 Bucket and I want to download these files in the directory you mentioned above, can you give a clue on how to do so