I am getting this error. Not sure what the solution is, but I do notice that after trying to run once, there are multiple safari processes left over:
JAUSTEN-M1:scripts jausten$ ps -ef | grep safari
502 5243 1629 0 9:50AM ttys001 0:00.00 grep safari
502 5202 3635 0 9:49AM ttys003 0:00.04 /System/Library/CoreServices/SafariSupport.bundle/Contents/MacOS/safaridriver --port 34851
502 5206 3635 0 9:49AM ttys003 0:00.04 /System/Library/CoreServices/SafariSupport.bundle/Contents/MacOS/safaridriver --port 16102
502 5210 3635 0 9:49AM ttys003 0:00.04 /System/Library/CoreServices/SafariSupport.bundle/Contents/MacOS/safaridriver --port 33731
502 5214 3635 0 9:49AM ttys003 0:00.04 /System/Library/CoreServices/SafariSupport.bundle/Contents/MacOS/safaridriver --port 21247
502 5218 3635 0 9:49AM ttys003 0:00.04 /System/Library/CoreServices/SafariSupport.bundle/Contents/MacOS/safaridriver --port 28780
502 5222 3635 0 9:49AM ttys003 0:00.04 /System/Library/CoreServices/SafariSupport.bundle/Contents/MacOS/safaridriver --port 4727
JAUSTEN-M1:scripts jausten$ pkill safaridriver
JAUSTEN-M1:scripts jausten$ ps -ef | grep safari
502 5262 1629 0 9:50AM ttys001 0:00.00 grep safari
I don't understand why this would be the case unless it is a bug in my automation framework.