0

Protractor version: 5.1.2 Safari version: 10.1.2

I have enabled 'Allow Remote Automation' from Safari -> Develop and started the safari driver from cmd using the following command: /usr/bin/safaridriver -p 8844

Now, trying to run the protractor tests using protractor conf.js. The tests fail to start with the following logs:

Build info: version: '3.5.1', revision: '9c21bb67ef', time: '2017-08-16T21:10:06.092Z'

System info: host: 'dyn-49-127-9-116.its.monash.edu.au', ip: 'fe80:0:0:0:479:1a15:751b:51d6%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_144'

Driver info: driver.version: unknown
[15:28:40] E/launcher - SessionNotCreatedError: Could not create a session: You must enable the 'Allow Remote Automation' option in Safari's Develop menu to control Safari via WebDriver. (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 32 milliseconds

Build info: version: '3.5.1', revision: '9c21bb67ef', time: '2017-08-16T21:10:06.092Z'

System info: host: 'dyn-49-127-9-116.its.monash.edu.au', ip: 'fe80:0:0:0:479:1a15:751b:51d6%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_144'

Driver info: driver.version: unknown

    at WebDriverError (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:27:5)

    at SessionNotCreatedError (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:214:5)

    at Object.checkLegacyResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:505:15)

    at parseHttpResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)

    at doSend.then.response (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:440:13)

    at process._tickCallback (internal/process/next_tick.js:109:7)

From: Task: WebDriver.createSession()

    at Function.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:777:24)

    at createDriver (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:167:33)

    at Builder.build (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:632:14)

    at Hosted.getNewDriver (/usr/local/lib/node_modules/protractor/lib/driverProviders/driverProvider.ts:60:29)

    at Runner.createBrowser (/usr/local/lib/node_modules/protractor/lib/runner.ts:225:39)

    at q.then.then (/usr/local/lib/node_modules/protractor/lib/runner.ts:391:27)

    at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:834:54)

    at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:863:30)

    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:796:13)

    at /usr/local/lib/node_modules/protractor/node_modules/q/q.js:556:49

[15:28:40] E/launcher - Process exited with error code 19
Annu
  • 51
  • 1
  • 7

2 Answers2

1

I figured out the issue. Since built in safari driver has a limitation of only one browser window at a time, I quit all the running safari windows and ran the tests again. Worked perfectly fine :)

Reference: https://webkit.org/blog/6900/webdriver-support-in-safari-10/

Annu
  • 51
  • 1
  • 7
0

Kinda tricky, because currently it's not quite working due webdriver/selenium incompatibilities. We are hoping that, with the new webdriver release, it will work. See here.

sdet.ro
  • 317
  • 3
  • 12