This code is not running in a Node.js environment, but instead is running in the context of the browser session giving you complete and direct access to the DOM of the application under test.
Hope this helps,
Hi Andrej Gajduk,
There is no direct way to verify that a file was downloaded or to verify the contents of that file. This is in line with ATS focus on UI testing.