Better message for creating session with W3C
MODIFY
lib/basedriver/commands/session.js
lib/basedriver/commands/session.js
@@ -20,7 +20,7 @@ commands.createSession = async function createSession (jsonwpDesiredCapabilities
if (w3cCapabilities) {
this.setProtocolW3C();
if (jsonwpDesiredCapabilities) {
- log.debug(`W3C capabilities ${_.truncate(JSON.stringify(w3cCapabilities))} and MJSONWP desired capabilities ${_.truncate(JSON.stringify(jsonwpDesiredCapabilities))} were provided`);
+ log.debug(`W3C capabilities and MJSONWP desired capabilities were provided`);
}
if (jsonwpDesiredCapabilities && !_.isPlainObject(w3cCapabilities)) {
@@ -33,12 +33,12 @@ commands.createSession = async function createSession (jsonwpDesiredCapabilities
this.setProtocolMJSONWP();
caps = jsonwpDesiredCapabilities;
} else {
- log.debug(`Creating session with W3C capabilities: ${_.truncate(JSON.stringify(w3cCapabilities))}`);
+ log.debug(`Creating session with W3C capabilities: ${JSON.stringify(w3cCapabilities, null, 2)}`);
caps = processCapabilities(w3cCapabilities, this.desiredCapConstraints, this.shouldValidateCaps);
}
} else {
this.setProtocolMJSONWP();
- log.debug(`Creating session with MJSONWP desired capabilities: ${_.truncate(JSON.stringify(jsonwpDesiredCapabilities))}`);
+ log.debug(`Creating session with MJSONWP desired capabilities: ${JSON.stringify(jsonwpDesiredCapabilities, null, 2)}`);
caps = jsonwpDesiredCapabilities || {};
}

Better message for creating session with W3C (#331)