Failed to connect to SafariDriver (Safari 10)

后端 未结 2 837
小蘑菇
小蘑菇 2021-01-02 23:48

I\'m getting the following error when running my protractor test on mac for safari

Failed to connect to SafariDriver after 10082 ms
Build info: version: \'2.         


        
2条回答
  •  长情又很酷
    2021-01-03 00:42

    Yes, you need to install a specific safari driver in order to launch it inside of protractor. And of course, you need to be on a mac. Protractor is essentially a layer built on top of Selenium, so you need to install the selenium driver for Safari, which is implemented as a Safari plugin.

    Here is what you need to do:

    1. Download the safari plugin from here.
    2. Run the plugin
    3. Select "Trust" the plugin when prompted by safari

    The driver is now installed and should be available to your protractor process.

    This is the driver for Selenium 2.48. I couldn't find a more recent build, so if this driver version doesn't run with the current version of Protractor, you will need to either use an older version of protractor that is based on Selenium 2.48 or build the safari driver from source.

提交回复
热议问题