Does DeviceFarm has local files that have data to be used for webtesting ?

0

I want to know if there is data on DeviceFarm local files that could be used for web testing. If so, how can I access this data or log the path of the local files into the terminal. If not, is there's a way that I can use to upload files into the website during testing other than using S3 Bucket? Thank you in advance.

1 Antwort
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.

AWS
SUPPORT-TECHNIKER
Ryan_A
beantwortet vor 2 Jahren
  • 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

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen