I have several ruby watir-webdriver scripts I am using to automate downloading files from various websites. simple scripts that log in to site, fill in text fields, click buttons….. what do I have to do to get the script to send an email alert any time there is an error or timeout? Scripts are running on a Mac OSX server and I can use /usr/bin/mail.
just looking to get a simple error message if the script stops before the last line of the script which is:
b.close
Thanks for all of your help
It’s not elegant, but the simplest way to do this would be to use a begin/rescue/end block.
You can update the “puts” section to instead email or write the error to a text file.