I've developed a workflow which accesses to a form, sets our requirements and download an Excel spreadsheet. The problem is the browser quits before the download is complete. As it is supposed to be executed periodically, we cannot have an unlimited number of chrome instances, so we must maintain the Quit WebDriver node.
In order to "solve" the issue, I've included a Wait node, but I suppose there are better solutions (or not). Is there any way to syncronize the nodes? The idea is the browser doesn't quit unless the download is complete.
There's unfortunatly no way, to wait for a download to finish with Selenium, as Selenium provides no API to the browser for that. The only possibility besides waiting which comes to my mind, would be to check on the filesystem, if the downloaded file is present (keep in mind, that depending on the browser, either the file will "appear" immediately when starting the download and grow in size, or will appear when the download has finished, which would make things easier, obvisouly).
Thanks again for your interest. I owe you one :-) By the way. Does Knime provide any node to do that sort of things? I've just taken a look at the IO nodes, but I don't see how to use them that way.
Anyway, maybe the timer is a good enough solution.
You may want to give KNIME's "Wait" node a try (not the one from the Selenium package, but in Workflow Control -> Automation). It has an option to wait for file modification or creation. Maybe that already does the job.
I looked at your workflow. How are you able to download the spreadsheet automatically. I always ran into the (FireFox-)browser prompt for downloading the file even if I have set to download files always into the same folder (and stop asking).
I have no chrome to test is it a FireFox problem ? I run it under Ubuntu 14.04 ...
Hi again, Michael,
on Firefox it's actually not that easy to bypass that download window (Chrome e.g. doesn't block the execution in that case). However, I've recently had a similar inquiry and might have an existing solution for you. Can you contact me via e-mail?