Skip to content

Selenium mutating configuration values #357

@basickarl

Description

@basickarl

The following code:

    console.log(seleniumConfiguration.drivers);
    await selenium.installAsync(seleniumConfiguration);
    seleniumChild = await selenium.startAsync({});
    console.log(seleniumConfiguration.drivers);

Results in:

{ chrome: 
   { version: '2.37',
     arch: 'x64',
     baseURL: 'https://chromedriver.storage.googleapis.com' },
  ie: 
   { version: '3.9.1',
     arch: 'x64',
     baseURL: 'https://selenium-release.storage.googleapis.com' },
  firefox: 
   { version: '0.20.0',
     arch: 'x64',
     baseURL: 'https://github.com/mozilla/geckodriver/releases/download' },
  edge: { version: '16299' } }
{ chrome: 
   { version: '2.37',
     arch: 'x64',
     baseURL: 'https://chromedriver.storage.googleapis.com' },
  firefox: 
   { version: '0.20.0',
     arch: 'x64',
     baseURL: 'https://github.com/mozilla/geckodriver/releases/download' },
  edge: { version: '16299' } }

Mutating the configuration object given is bad practice. It would be good for the instance to hold it's own new object instead.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions