Skip to content

Commit

Permalink
[js] Add new websocketUrl capability
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester committed Sep 28, 2021
1 parent 47777fe commit 05a3a5e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions javascript/node/selenium-webdriver/lib/webdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ const W3C_CAPABILITY_NAMES = new Set([
'acceptInsecureCerts',
'browserName',
'browserVersion',
'platformName',
'pageLoadStrategy',
'platformName',
'proxy',
'setWindowRect',
'timeouts',
'strictFileInteractability',
'timeouts',
'unhandledPromptBehavior',
'webSocketUrl'
])

/**
Expand Down Expand Up @@ -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
}
}

Expand Down

0 comments on commit 05a3a5e

Please sign in to comment.