File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
javascript/node/selenium-webdriver/lib Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ const error = require('./error');
30
30
const logging = require ( './logging' ) ;
31
31
const promise = require ( './promise' ) ;
32
32
const Session = require ( './session' ) . Session ;
33
-
33
+ const WebElement = require ( './webdriver' ) . WebElement ;
34
34
35
35
36
36
/**
@@ -409,13 +409,10 @@ function buildPath(path, parameters) {
409
409
let key = pathParameters [ i ] . substring ( 2 ) ; // Trim the /:
410
410
if ( key in parameters ) {
411
411
let value = parameters [ key ] ;
412
- // TODO: move webdriver.WebElement.ELEMENT definition to a
413
- // common file so we can reference it here without pulling in all of
414
- // webdriver.WebElement's dependencies.
415
- if ( value && value [ 'ELEMENT' ] ) {
412
+ if ( WebElement . isId ( value ) ) {
416
413
// When inserting a WebElement into the URL, only use its ID value,
417
414
// not the full JSON.
418
- value = value [ 'ELEMENT' ] ;
415
+ value = WebElement . extractId ( value ) ;
419
416
}
420
417
path = path . replace ( pathParameters [ i ] , '/' + value ) ;
421
418
delete parameters [ key ] ;
You can’t perform that action at this time.
0 commit comments