Since upgrading to Safari 12, my automated scripts are now getting this error:
SessionNotCreatedError: Request body does not contain required parameter 'capabilities'.
(The error does not occur for other browsers).
I'm using the javascript webdriver bindings and, when I build webdriver, I use the withCapability key value pairs:
var capabs = {
'browserName' : 'Safari',
'version' : '12.0'
}
browserUnderTest = new webdriver.Builder().
withCapabilities(capabs)
.forBrowser('safari')
.build();
I think the problem is with the safari.js file itself, but I don't know enough about how it operates to pinpoint anything. Here is the full text of the error:
SessionNotCreatedError: Request body does not contain required parameter 'capabilities'.
at Object.throwDecodedError (/Users/qualit/Documents/autotests/node_modules/selenium-webdriver/lib/error.js:514:15)
at parseHttpResponse (/Users/qualit/Documents/autotests/node_modules/selenium-webdriver/lib/http.js:519:13)
at doSend.then.response (/Users/qualit/Documents/autotests/node_modules/selenium-webdriver/lib/http.js:441:30)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
From: Task: WebDriver.createSession()
at Function.createSession (/Users/qualit/Documents/autotests/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
at Function.createSession (/Users/qualit/Documents/autotests/node_modules/selenium-webdriver/safari.js:253:41)
at createDriver (/Users/qualit/Documents/autotests/node_modules/selenium-webdriver/index.js:170:33)
at Builder.build (/Users/qualit/Documents/autotests/node_modules/selenium-webdriver/index.js:660:16)
at Object.<anonymous> (/Users/qualit/Documents/autotests/K8_autotest.js:354:6)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
Does anyone have any ideas about the cause of this or a fix?