Mostly got it working, if you put a pause before the accept/dismiss alert command.
Now works sans the pause before the accept/dismiss.
Merge pull request #179 from sebuilder/fix_alerts

Fix alerts