7272
7373'use strict'
7474
75- const http = require ( './http' ) ,
76- io = require ( './io' ) ,
77- capabilities = require ( './lib/capabilities' ) ,
78- Symbols = require ( './lib/symbols' ) ,
79- webdriver = require ( './lib/webdriver' ) ,
80- remote = require ( './remote' )
75+ const http = require ( './http' )
76+ const io = require ( './io' )
77+ const capabilities = require ( './lib/capabilities' )
78+ const Symbols = require ( './lib/symbols' )
79+ const webdriver = require ( './lib/webdriver' )
80+ const remote = require ( './remote' )
8181
8282/**
8383 * Name of the OperaDriver executable.
@@ -153,7 +153,7 @@ class ServiceBuilder extends remote.DriverService.Builder {
153153}
154154
155155/** @type {remote.DriverService } */
156- var defaultService = null
156+ let defaultService = null
157157
158158/**
159159 * Sets the default service to use for new OperaDriver instances.
@@ -187,7 +187,7 @@ function getDefaultService() {
187187 * @type {string }
188188 * @const
189189 */
190- var OPTIONS_CAPABILITY_KEY = 'chromeOptions'
190+ const OPTIONS_CAPABILITY_KEY = 'chromeOptions'
191191
192192/**
193193 * Class for managing {@linkplain Driver OperaDriver} specific options.
@@ -217,8 +217,8 @@ class Options {
217217 * @return {!Options } The OperaDriver options.
218218 */
219219 static fromCapabilities ( caps ) {
220- var options
221- var o = caps . get ( OPTIONS_CAPABILITY_KEY )
220+ let options
221+ const o = caps . get ( OPTIONS_CAPABILITY_KEY )
222222 if ( o instanceof Options ) {
223223 options = o
224224 } else if ( o ) {
@@ -249,8 +249,8 @@ class Options {
249249 * @param {...(string|!Array.<string>) } var_args The arguments to add.
250250 * @return {!Options } A self reference.
251251 */
252- addArguments ( var_args ) { // eslint-disable-line
253- this . args_ = this . args_ . concat . apply ( this . args_ , arguments )
252+ addArguments ( ... var_args ) {
253+ this . args_ = this . args_ . concat . apply ( this . args_ , var_args )
254254 return this
255255 }
256256
@@ -262,11 +262,8 @@ class Options {
262262 * extensions to add.
263263 * @return {!Options } A self reference.
264264 */
265- addExtensions ( var_args ) { // eslint-disable-line
266- this . extensions_ = this . extensions_ . concat . apply (
267- this . extensions_ ,
268- arguments
269- )
265+ addExtensions ( ...var_args ) {
266+ this . extensions_ = this . extensions_ . concat . apply ( this . extensions_ , var_args )
270267 return this
271268 }
272269
@@ -358,19 +355,19 @@ class Driver extends webdriver.WebDriver {
358355 * @return {!Driver } A new driver instance.
359356 */
360357 static createSession ( opt_config , opt_service ) {
361- var service = opt_service || getDefaultService ( )
362- var client = service . start ( ) . then ( ( url ) => new http . HttpClient ( url ) )
363- var executor = new http . Executor ( client )
358+ const service = opt_service || getDefaultService ( )
359+ const client = service . start ( ) . then ( ( url ) => new http . HttpClient ( url ) )
360+ const executor = new http . Executor ( client )
364361
365- var caps =
362+ let caps =
366363 opt_config instanceof Options
367364 ? opt_config . toCapabilities ( )
368365 : opt_config || capabilities . Capabilities . opera ( )
369366
370367 // On Linux, the OperaDriver does not look for Opera on the PATH, so we
371368 // must explicitly find it. See: operachromiumdriver #9.
372369 if ( process . platform === 'linux' ) {
373- var options = Options . fromCapabilities ( caps )
370+ const options = Options . fromCapabilities ( caps )
374371 if ( ! options . binary_ ) {
375372 let exe = io . findInPath ( 'opera' , true )
376373 if ( ! exe ) {
0 commit comments