I have an existing test suite that uses WebDriverJs with node.js and am adding support for Safari on OSX 10.10. The suite currently supports IE11 and Chrome and runs via Jenkins. I can get selenium running locally with SafariDriver using the -noinstall option after manually installing the extension. When I try run the automation on the same machine as a Jenkins slave, though, the extension doesn't load, and the webdriver fails with "
UnknownError: Failed to connect to SafariDriver after N ms". This failure happens whether Jenkins connects to the slave via SSH or Java Web Start; I found that it also happens if I manually ssh into the machine and run launch the node.js same command myself.
I also found that I can I manually install the extension in the Safari session while the automation is running, which will cause the extension will be installed on subsequent launches. However, when Safari launches, I'll receive a "your extensions have been migrated" message, and the extension will be disabled, which causes webdriver will fail with the same error. Even if I enable the extension within the webdriver session, the setting isn't retained so it fails consistently.
Other possibly pertinent info:
- I wasn't able to get SafariDriver to run even locally without the -noinstall option
- The same suite runs without problems on the same jenkins slave when using ChromeDriver
- I'm seeing the same behavior with Mavericks/Safari 7.1
- My selenium-server and SafariDriver are both version 2.44
It seems that something about the remote connection is precluding Safari from loading the extension and/or from persisting the extension settings. Has anybody else encountered this issue? Any ideas or suggestions for workarounds? Thanks!