Background: Working on some file download tests with Protractor and Chrome. I run on a selenium grid, so the tests and my Node env are executing on a server (e.g. 8.2.2.2
) while the file downloads are on a remote windows machine (e.g. 14.3.3.3
).
The file download used to be stored on the same server that also kicked off the tests, so I was just waiting for a file to exist before performing my assertion:
browser.wait(() => {
return fs.existsSync(filePath)
}).then(() => {
// expect something
})
Problem: Now, the files dont write to the Server (they download directly to the browser) so I have nothing to grab... so far. Since I use a selenium grid I can't directly read the remote machine from the test server.
Question: Will the protractor browser object or chromedriver have any information about that file download that I can grab? Trying to find a way to access both file name and file size? I'm digging into the browser object but havent found anything yet.