First of all, starting with Safari 10, Safari comes bundled with a new driver implementation. The old driver (the extension) is deprecated. You're using macOS 10.12.2, so it's your case. To enable the new driver in Safari, toggle the Allow Remote Automation checkbox in the Develop menu. If you don't have this menu, enable it: Preferences > Advanced > Show Develop menu in menu bar. Start /usr/bin/safaridriver
once manually to grant it the permissions needed.
Secondly, you need a 3.x version of the Selenium Standalone Server, not 2.53.1. The command to install it:
sudo webdriver-manager update --versions.standalone 3.0.1
To start:
webdriver-manager start --versions.standalone 3.0.1
Thirdly, the visibility checks are broken in the new driver. So things like browser.wait(ExpectedConditions.visibilityOf(myElement), 5000);
don't work and lead to UnsupportedCommandException
. In order to fix this, you can try installing Safari Technology Preview and running tests there (add 'safari.options': { technologyPreview: true }
to the capabilities). But for me, the preview works even worse than the release. Protractor says it can't find Angular on the page because they changed window.name
to be cleared after a cross-origin navigation in the Release 19. If you happen to find a way to make it work, please let me know.
Below are some links you should check because I might have missed something.