How to handle windows file upload and download through script using protractor?Windows file Upload Image
Asked
Active
Viewed 472 times
1 Answers
0
<input name="upload" type="file">
Upload Solution:
var absolutePath = path.join(__dirname,'..\\..\\dash-e2e-tests\\resources\\files-cabin\\test-files\\image.png); element(by.xpath("xpath")).sendKeys(absolutePath);
Download Solution:
capabilities: {
browserName: 'chrome',
'chromeOptions': {
prefs: {
download: {
'prompt_for_download': false,
'directory_upgrade': true,
'default_directory': downloadfile
}
}
}
},

Shiwantha Lakmal
- 17
- 5