Bug 1838152 - Improve error message when sending session.new without capabilities. r=Sasha,webdriver-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D206966
This commit is contained in:
gravyant 2024-04-09 13:53:13 +00:00
parent 6776017a56
commit b8abfd4b0b

View File

@ -1031,7 +1031,10 @@ export function validateCapabilities(capabilities) {
*/
export function processCapabilities(params) {
const { capabilities } = params;
lazy.assert.object(capabilities);
lazy.assert.object(
capabilities,
lazy.pprint`Expected "capabilities" to be an object, got ${capabilities}`
);
let {
alwaysMatch: requiredCapabilities = {},