From 05a3a5ecc4f3fe5385da7b02c7706261bc9e211c Mon Sep 17 00:00:00 2001 From: AutomatedTester Date: Tue, 28 Sep 2021 15:57:49 +0100 Subject: [PATCH] [js] Add new websocketUrl capability --- javascript/node/selenium-webdriver/lib/webdriver.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/javascript/node/selenium-webdriver/lib/webdriver.js b/javascript/node/selenium-webdriver/lib/webdriver.js index fd78d2ac609f5..907e20ae48c03 100644 --- a/javascript/node/selenium-webdriver/lib/webdriver.js +++ b/javascript/node/selenium-webdriver/lib/webdriver.js @@ -43,13 +43,14 @@ const W3C_CAPABILITY_NAMES = new Set([ 'acceptInsecureCerts', 'browserName', 'browserVersion', - 'platformName', 'pageLoadStrategy', + 'platformName', 'proxy', 'setWindowRect', - 'timeouts', 'strictFileInteractability', + 'timeouts', 'unhandledPromptBehavior', + 'webSocketUrl' ]) /** @@ -1232,13 +1233,13 @@ class WebDriver { if (debuggerAddress.match(/\/se\/cdp/)) { if (debuggerAddress.match("ws:\/\/", "http:\/\/")) { - return debuggerAddress.replace("ws:\/\/", "http:\/\/") + return debuggerAddress.replace("ws:\/\/", "http:\/\/") } else if (debuggerAddress.match("wss:\/\/", "https:\/\/")) { - return debuggerAddress.replace("wss:\/\/", "https:\/\/") + return debuggerAddress.replace("wss:\/\/", "https:\/\/") } else { - return debuggerAddress + return debuggerAddress } }