Skip to content

Commit

Permalink
feat/deprecation message for standalone3x (#11422)
Browse files Browse the repository at this point in the history
* feat/deprecation message for standalone3x

* Update javascript/node/selenium-webdriver/remote/util.js

Co-authored-by: Diego Molina <[email protected]>

Co-authored-by: Diego Molina <[email protected]>
  • Loading branch information
potapovDim and diemol authored Dec 13, 2022
1 parent 4ce44c6 commit 8141f82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions javascript/node/selenium-webdriver/remote/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const cmd = require('../lib/command')
const input = require('../lib/input')
const net = require('../net')
const portprober = require('../net/portprober')
const logging = require('../lib/logging')

const { getJavaPath, formatSpawnArgs } = require('./util')

Expand Down Expand Up @@ -119,6 +120,8 @@ class DriverService {
* @param {!ServiceOptions} options Configuration options for the service.
*/
constructor(executable, options) {
/** @private @const */
this.log_ = logging.getLogger('webdriver.DriverService')
/** @private {string} */
this.executable_ = executable

Expand Down
5 changes: 4 additions & 1 deletion javascript/node/selenium-webdriver/remote/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ function isSelenium3x(seleniumStandalonePath) {
* @returns {Array.<string>}
*/
function formatSpawnArgs(seleniumStandalonePath, args) {
if (isSelenium3x(seleniumStandalonePath)) return args
if (isSelenium3x(seleniumStandalonePath)) {
console.warn('Deprecation: Support for Standalone Server 3.x will be removed soon. Please update to version 4.x')
return args
}

const standaloneArg = 'standalone'
const port3xArgFormat = '-port'
Expand Down

0 comments on commit 8141f82

Please sign in to comment.