Fix: w3c response missing 'capabilities'
MODIFY
lib/mjsonwp/mjsonwp.js
lib/mjsonwp/mjsonwp.js
@@ -283,14 +283,14 @@ function buildHandler (app, method, path, spec, driver, isSessCmd) {
// unpack createSession response
if (spec.command === 'createSession') {
newSessionId = driverRes[0];
+ if (driver.protocol === BaseDriver.DRIVER_PROTOCOL.MJSONWP) {
driverRes = driverRes[1];
- if (driver.protocol === BaseDriver.DRIVER_PROTOCOL.W3C) {
+ } else if (driver.protocol === BaseDriver.DRIVER_PROTOCOL.W3C) {
driverRes = {
capabilities: driverRes[1],
};
}
}
-
// convert undefined to null, but leave all other values the same
if (_.isUndefined(driverRes)) {
driverRes = null;

Fix: w3c response missing 'capabilities'