First of all, starting with Safari 10, Safari comes with a new driver version. The old driver (extension) is out of date. You are using macOS 10.12.2, so this is your case. To enable the new driver in Safari, select the Allow remote automation check box in the Design menu. If you do not have this menu, enable it: Settings> Advanced> Show "Development" menu in the menu bar. Run /usr/bin/safaridriver
once manually to give it the necessary permissions.
Secondly, you need version 3.0 for a standalone Selenium server, not 2.53.1. The command to install it:
sudo webdriver-manager update --versions.standalone 3.0.1
To get started:
webdriver-manager start --versions.standalone 3.0.1
Thirdly, the visibility check in the new driver is violated. Therefore, things like browser.wait(ExpectedConditions.visibilityOf(myElement), 5000);
, do not work, and lead to an UnsupportedCommandException
. To fix this, you can try installing Safari Technology Preview and run the tests there (add 'safari.options': { technologyPreview: true }
to the features). But for me, the preview works even worse than the release. The protractor says they cannot find Angular on the page because they changed window.name
to clear after cross navigation in Release 19 . If you are fortunate enough to find a way to make it work, please let me know.
Below are some links that you should check because I might have missed something.
thorn source share