File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
javascript/node/selenium-webdriver/lib Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1229,6 +1229,19 @@ class WebDriver {
1229
1229
if ( target && cdpTargets . indexOf ( target . toLowerCase ( ) ) === - 1 ) {
1230
1230
throw new error . InvalidArgumentError ( 'invalid target value' )
1231
1231
}
1232
+
1233
+ if ( debuggerAddress . match ( / \/ s e \/ c d p / ) ) {
1234
+ if ( debuggerAddress . match ( "ws:\/\/" , "http:\/\/" ) ) {
1235
+ return debuggerAddress . replace ( "ws:\/\/" , "http:\/\/" )
1236
+ }
1237
+ else if ( debuggerAddress . match ( "wss:\/\/" , "https:\/\/" ) ) {
1238
+ return debuggerAddress . replace ( "wss:\/\/" , "https:\/\/" )
1239
+ }
1240
+ else {
1241
+ return debuggerAddress
1242
+ }
1243
+ }
1244
+
1232
1245
const path = '/json/version'
1233
1246
let request = new http . Request ( 'GET' , path )
1234
1247
let client = new http . HttpClient ( 'http://' + debuggerAddress )
You can’t perform that action at this time.
0 commit comments