I have made several scripts for my work as an Accountant that automates many of our daily tasks like downloading some pdfs and mailing them. This scripts are made with Ruby, Watir and chromedriver. The main problem that i thought i was going to have is the change in the websites but that was not as problematic as the updates in chrome.
Every time there was a chrome update they changed the flags so i was unable to download pdfs i had to find the appropriate flags and it was fraustrating.
I manage to solve the above problem by creating a new profile of chrome for every script then changing the settings and manually saved them.
But there are at least 50 scripts and everyone needs a different setting for the chromedriver, it starts to get on my nerves.
Except that, I deployed an Ubuntu machine so everything will be more automated and not starting manually the script from my windows machine. Even in there the chromium keeps getting the same changes and eventually when updated it breaks everything.
I thought that the phantomjs could be good but I see that it is dead.
So the main question is do you know any driver that I can use, that hasn't got all the cr@p that the chrome does?
Thanks
To anyone dealing with Watir and Chromedriver or Chrome in general. It seems that the pref directory_upgrade must be set in order for the chromedriver to download the file. Also to the ones using watir. In the latest versions this
prefs = {
download: {
prompt_for_download: false,
default_directory: path,
},
plugins: {
always_open_pdf_externally: true
},
}
must be modified like this
prefs = {
download: {
"prompt_for_download" => false,
"directory_upgrade" => true,
"default_directory" => path,
},
plugins: {
"always_open_pdf_externally" => true
},
}