Giter Club home page Giter Club logo

wdio-selenium-standalone-service's People

Contributors

andriilazebnyi avatar axelhildingson avatar christian-bromann avatar davidaubin19 avatar doteightyone avatar gauravrajput44 avatar georgecrawford avatar just-boris avatar klamping avatar michal-boruczkowski avatar monolithed avatar rb9-soccer avatar robfarr avatar zinserjan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wdio-selenium-standalone-service's Issues

Selenium exited before it could start

A service failed in the 'onPrepare' hook
Error: Selenium exited before it could start
    at ChildProcess.errorIfNeverStarted (/Users/david/projects/elitedaily/ed-bootstrap/www/ed-com/tests/webdriver/node_modules/selenium-standalone/lib/start.js:128:15)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

I get this every time I run a test using wdio. Using latest stuff:

    "chai": "3.5.0",
    "mocha": "3.0.2",
    "phantomjs-prebuilt": "2.1.12",
    "selenium-standalone": "5.6.1",
    "wdio-junit-reporter": "^0.1.0",
    "wdio-mocha-framework": "^0.4.0",
    "wdio-phantomjs-service": "^0.1.0",
    "wdio-selenium-standalone-service": "0.0.6",
    "wdio-spec-reporter": "0.0.3",
    "webdriverio": "4.2.8"

A service failed in the 'onPrepare' hook

the connection timeout is a floating error, but because of the attempt to install the browser drivers every time the test is started with this service, the tests quite often fail to start.
I understand that the error is not with the service. you can add a driver check before the test, which is available in selenium-standalone because at timeout, in addition to what I'm waiting for about thirty seconds, it still does not start. It does not start when there are already installed browser drivers.

`A service failed in the 'onPrepare' hook
Error: Could not request headers from https://selenium-release.storage.googleapis.com/3.7/IEDriverServer_Win32_3.7.0.zip: Error: connect ETIMEDOUT 74.125.205.128:443
at Request. (C:\Users\node\Desktop\AT\TAS_RC\node_modules\selenium-standalone\lib\install.js:552:8)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at Request.onRequestError (C:\Users\node\Desktop\AT\TAS_RC\node_modules\selenium-standalone\node_modules\request\request.js:845:8)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at TLSSocket.socketErrorListener (_http_client.js:387:9)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)

Continue...`

No Firefox driver exist

Your latest version does not seem to have the Firefox driver:

ERROR: connection refused
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'M3.local', ip: '10.0.202.101', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.3', java.version: '1.8.0_92'
Driver info: driver.version: unknown
remote stacktrace: stack backtrace:
   0:        0x10d07149e - backtrace::backtrace::trace::h3ab5720c483fe461
   1:        0x10d0714dc - backtrace::capture::Backtrace::new::h096accf58447e0d5
   2:        0x10cfaa534 - webdriver::error::WebDriverError::new::hc0958d01acda7bfc
   3:        0x10cfb1300 - geckodriver::marionette::MarionetteHandler::create_connection::h59a68c8dfef48e54
   4:        0x10cf90d3c - _$LT$webdriver..server..Dispatcher$LT$T$C$$u20$U$GT$$GT$::run::h5a26ba0bb4fdb139
   5:        0x10cf690c5 - std::sys_common::backtrace::__rust_begin_short_backtrace::h3f868f7a1a12bdcc
   6:        0x10cf73d2d - std::panicking::try::do_call::hfce1ad2a948c3632
   7:        0x10d11da5c - __rust_maybe_catch_panic
   8:        0x10cf86eb5 - _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::h651dedb755194a8c
   9:        0x10d119c4b - std::sys::imp::thread::Thread::new::thread_start::h48c72bb09587cbc3
  10:     0x7fff602256c0 - _pthread_body
  11:     0x7fff6022556c - _pthread_start
firefox
    at new RuntimeError (/Users/michael-heuberger/code/something/legacy/node_modules/webdriverio/build/lib/utils/ErrorHandler.js:144:12)
    at Request._callback (/Users/michael-heuberger/code/something/legacy/node_modules/webdriverio/build/lib/utils/RequestHandler.js:316:39)
    at Request.self.callback (/Users/michael-heuberger/code/something/legacy/node_modules/webdriverio/node_modules/request/request.js:186:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/Users/michael-heuberger/code/something/legacy/node_modules/webdriverio/node_modules/request/request.js:1163:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/Users/michael-heuberger/code/something/legacy/node_modules/webdriverio/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:313:30)

Changelog?

I see there was a release over the last few days, but I don't see anywhere a Changelog describing those changes. Since we're using this in production, would be nice to get an idea of what has changed.

Thanks

At the time of execuiting my scripts I am getting following error

C:\Framework>npx ntaf run wdio.local.conf.js
npx: installed 1 in 19.119s
Path must be a string. Received undefined
C:\Framework\node_modules\ntaf\bin\ntaf.js
A service failed in the 'onPrepare' hook
Error: Could not download https://download.microsoft.com/download/D/4/1/D417998A
-58EE-4EFE-A7CC-39EF9E020768/MicrosoftWebDriver.exe: Error: connect ETIMEDOUT 23
.54.115.197:443
at Request. (C:\Framework\node_modules\selenium-standalone\lib\in
stall.js:386:12)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at Request.onRequestError (C:\Framework\node_modules\request\request.js:845:
8)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at TLSSocket.socketErrorListener (_http_client.js:387:9)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)

Continue...
ERROR: connect ECONNREFUSED 127.0.0.1:4444
chrome
at new RuntimeError (C:\Framework\node_modules\webdriverio\build\lib\utils\E
rrorHandler.js:144:12)
at Request._callback (C:\Framework\node_modules\webdriverio\build\lib\utils
RequestHandler.js:327:43)
at self.callback (C:\Framework\node_modules\webdriverio\node_modules\request
\request.js:186:22)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at Request.onRequestError (C:\Framework\node_modules\webdriverio\node_module
s\request\request.js:878:8)
at emitOne (events.js:121:20)
at ClientRequest.emit (events.js:211:7)
at Socket.socketErrorListener (_http_client.js:387:9)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at emitErrorNT (internal/streams/destroy.js:64:8)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)

0 steps (0 passed, 0 failed, 0 pending)

"Actions" dont work on Firefox with ver 0.0.10

Hey guys, I have noticed that actions aren't working when I use you package. Please note that when I run selenium-server-standalone-3.11.0 and point to to gecko driver the same action work perfectly fine.

[ { "type": "pointer", "id": "finger1", "parameters": {"pointerType": "mouse"}, "actions": [ { "type": "pointerMove", "duration": 0, "x": location.x + xOffset, "y": location.y + yOffset }, ], }, ]

I have attached some logs for you guys
selenium-standalone.txt

Getting timed out exception

Hi. I'm getting below error when I run the tests from command line. However, I can click and download the driver from the below link.

A service failed in the 'onPrepare' hook
Error: Could not download https://chromedriver.storage.googleapis.com/2.43/chromedriver_mac64.zip: Error: connect ETIMEDOUT 172.217.4.240:443
at Request. (/Users/coupons/node_modules/wdio-selenium-standalone-service/node_modules/selenium-standalone/lib/install.js:386:12)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at Request.onRequestError (/Users/coupons/node_modules/request/request.js:881:8)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at TLSSocket.socketErrorListener (_http_client.js:401:9)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)

Please let me know what I'm missing

Error in onReload hook: "Error"

Hi,

I'm constantly receiving the following error upon running my tests:
Error in onReload hook: "Error"

I'd mentioned this in the webdriverio Gitter channel and @christian-bromann mentioned it was a problem with my Selenium grid.

As far as I was aware this package would be taking care of that for me.

For reference please see my wdio.conf.jsbelow:

exports.config = {
  //
  // ==================
  // Specify Test Files
  // ==================
  // Define which test specs should run. The pattern is relative to the directory
  // from which `wdio` was called. Notice that, if you are calling `wdio` from an
  // NPM script (see https://docs.npmjs.com/cli/run-script) then the current working
  // directory is where your package.json resides, so `wdio` will be called from there.
  //
  specs: [
    '**/*.test.js'
  ],
  // Patterns to exclude.
  exclude: [
    'node_modules/**/*'
    // 'path/to/excluded/files'
  ],
  //
  // ============
  // Capabilities
  // ============
  // Define your capabilities here. WebdriverIO can run multiple capabilities at the same
  // time. Depending on the number of capabilities, WebdriverIO launches several test
  // sessions. Within your capabilities you can overwrite the spec and exclude options in
  // order to group specific specs to a specific capability.
  //
  // First, you can define how many instances should be started at the same time. Let's
  // say you have 3 different capabilities (Chrome, Firefox, and Safari) and you have
  // set maxInstances to 1; wdio will spawn 3 processes. Therefore, if you have 10 spec
  // files and you set maxInstances to 10, all spec files will get tested at the same time
  // and 30 processes will get spawned. The property handles how many capabilities
  // from the same test should run tests.
  //
  maxInstances: 10,
  //
  // If you have trouble getting all important capabilities together, check out the
  // Sauce Labs platform configurator - a great tool to configure your capabilities:
  // https://docs.saucelabs.com/reference/platforms-configurator
  //
  capabilities: [{
    // maxInstances can get overwritten per capability. So if you have an in-house Selenium
    // grid with only 5 firefox instances available you can make sure that not more than
    // 5 instances get started at a time.
    maxInstances: 5,
    //
    browserName: 'chrome',
    chromeOptions: {
      args: ["incognito"]
    }
  }],
  //
  // ===================
  // Test Configurations
  // ===================
  // Define all options that are relevant for the WebdriverIO instance here
  //
  // By default WebdriverIO commands are executed in a synchronous way using
  // the wdio-sync package. If you still want to run your tests in an async way
  // e.g. using promises you can set the sync option to false.
  sync: true,
  //
  // Level of logging verbosity: silent | verbose | command | data | result | error
  logLevel: 'silent',
  //
  // Enables colors for log output.
  coloredLogs: true,
  //
  // If you only want to run your tests until a specific amount of tests have failed use
  // bail (default is 0 - don't bail, run all tests).
  bail: 0,
  //
  // Saves a screenshot to a given path if a command fails.
  // screenshotPath: './errorShots/',
  //
  // Set a base URL in order to shorten url command calls. If your url parameter starts
  // with "/", then the base url gets prepended.
  baseUrl: 'http://localhost',
  //
  // Default timeout for all waitFor* commands.
  waitforTimeout: 30000,
  //
  // Default timeout in milliseconds for request
  // if Selenium Grid doesn't send response
  connectionRetryTimeout: 90000,
  //
  // Default request retries count
  connectionRetryCount: 3,
  //
  // Initialize the browser instance with a WebdriverIO plugin. The object should have the
  // plugin name as key and the desired plugin options as properties. Make sure you have
  // the plugin installed before running any tests. The following plugins are currently
  // available:
  // WebdriverCSS: https://github.com/webdriverio/webdrivercss
  // WebdriverRTC: https://github.com/webdriverio/webdriverrtc
  // Browserevent: https://github.com/webdriverio/browserevent
  // plugins: {
  //   webdrivercss: {
  //     screenshotRoot: 'my-shots',
  //     failedComparisonsRoot: 'diffs',
  //     misMatchTolerance: 0.05,
  //     screenWidth: [320,480,640,1024]
  //   },
  //   webdriverrtc: {},
  //   browserevent: {}
  // },
  //
  // Test runner services
  // Services take over a specific job you don't want to take care of. They enhance
  // your test setup with almost no effort. Unlike plugins, they don't add new
  // commands. Instead, they hook themselves up into the test process.
  services: [
    'selenium-standalone',
    // 'browserstack'
  ],
  //
  // Framework you want to run your specs with.
  // The following are supported: Mocha, Jasmine, and Cucumber
  // see also: http://webdriver.io/guide/testrunner/frameworks.html
  //
  // Make sure you have the wdio adapter package for the specific framework installed
  // before running any tests.
  framework: 'mocha',
  //
  // Test reporter for stdout.
  // The only one supported by default is 'dot'
  // see also: http://webdriver.io/guide/testrunner/reporters.html
  reporters: [
    'spec',
    'json'
  ],
  reporterOptions: {
    outputDir: '/results'
  },
  //
  // Options to be passed to Mocha.
  // See the full list at http://mochajs.org/
  mochaOpts: {
    ui: 'bdd',
    timeout: '30000'
  },
  //
  // =====
  // Hooks
  // =====
  // WebdriverIO provides several hooks you can use to interfere with the test process in order to enhance
  // it and to build services around it. You can either apply a single function or an array of
  // methods to it. If one of them returns with a promise, WebdriverIO will wait until that promise got
  // resolved to continue.
  //
  // Gets executed once before all workers get launched.
  // onPrepare: function (config, capabilities) {
  // },
  //
  // Gets executed just before initialising the webdriver session and test framework. It allows you
  // to manipulate configurations depending on the capability or spec.
  // beforeSession: function (config, capabilities, specs) {
  // },
  //
  // Gets executed before test execution begins. At this point you can access all global
  // variables, such as `browser`. It is the perfect place to define custom commands.
  before: function (capabilities, specs) {
    browser.addCommand('waitForWidget', function (pageUrl) {
      const frameUrl = 'iframe[src="https://iframeurl.html"]';
      browser.url(pageUrl);
      browser.waitForExist(frameUrl);
      browser.frame($(frameUrl).value);
      browser.waitForVisible('[data-ref="LayoutContainer"]');
    });
    browser.addCommand('waitForWidgetReload', function (pageUrl) {
      const frameUrl = 'iframe[src="https://iframeurl.html"]';
      browser.url(pageUrl);
      browser.click('#render');
      browser.waitForExist(frameUrl);
      browser.frame($(frameUrl).value);
      browser.waitForVisible('[data-ref="LayoutContainer"]');
    });
    browser.addCommand('waitForWidgetBrowserReload', function (pageUrl) {
      const frameUrl = 'iframe[src="https://iframeurl.html"]';
      browser.reload();
      browser.url(pageUrl);
      browser.waitForExist(frameUrl);
      browser.frame($(frameUrl).value);
      browser.waitForVisible('[data-ref="LayoutContainer"]');
    });
  },
  //
  // Hook that gets executed before the suite starts
  // beforeSuite: function (suite) {
  // },
  //
  // Hook that gets executed _before_ a hook within the suite starts (e.g. runs before calling
  // beforeEach in Mocha)
  // beforeHook: function () {
  // },
  //
  // Hook that gets executed _after_ a hook within the suite starts (e.g. runs after calling
  // afterEach in Mocha)
  // afterHook: function () {
  // },
  //
  // Function to be executed before a test (in Mocha/Jasmine) or a step (in Cucumber) starts.
  // beforeTest: function (test) {
  // },
  //
  // Runs before a WebdriverIO command gets executed.
  // beforeCommand: function (commandName, args) {
  // },
  //
  // Runs after a WebdriverIO command gets executed
  // afterCommand: function (commandName, args, result, error) {
  // },
  //
  // Function to be executed after a test (in Mocha/Jasmine) or a step (in Cucumber) starts.
  // afterTest: function (test) {
  // },
  //
  // Hook that gets executed after the suite has ended
  // afterSuite: function (suite) {
  // },
  //
  // Gets executed after all tests are done. You still have access to all global variables from
  // the test.
  // after: function (result, capabilities, specs) {
  // },
  //
  // Gets executed right after terminating the webdriver session.
  // afterSession: function (config, capabilities, specs) {
  // },
  //
  // Gets executed after all workers got shut down and the process is about to exit. It is not
  // possible to defer the end of the process using a promise.
  // onComplete: function(exitCode) {
  // }
}

Please also see my package.json for my currently installed packages / versions:

{
  "name": "e2e",
  "description": "end-to-end tests for all products",
  "version": "0.0.1",
  "author": "me ([email protected])",
  "devDependencies": {
    "chai": "^3.5.0",
    "mocha": "^3.2.0",
    "shouldit": "^0.4.7",
    "wdio-browserstack-service": "^0.1.4",
    "wdio-json-reporter": "^0.1.1",
    "wdio-mocha-framework": "^0.5.8",
    "wdio-selenium-standalone-service": "^0.0.8",
    "wdio-spec-reporter": "^0.0.5",
    "webdriverio": "^4.6.2"
  },
  "dependencies": {},
  "scripts": {
    "test:e2e": "rm -rf results; node_modules/.bin/wdio wdio.conf.js; node wdio-json-transformer.js",
    "shouldit": "node_modules/.bin/shouldit -c shouldit.conf.json",
    "stub": "node_modules/.bin/shouldit --hint javascript -c shouldit.conf.json"
  }
}

Could someone help me out with this problem I've been having for a while now please?

Many thanks!

ChromeDriver fails to load on v0.0.10

With the 0.0.10 update, chromeDriver no longer seems to load correctly, returning the following error:

 The driver executable does not exist: `/PATH/TO/PROJECT/node_modules/selenium-standalone/.selenium/chromedriver/2.33-x64-chromedriver

It seems to be defaulting to chromeDriver version 2.33 even though the default settings specify 2.36.
I'm running selenium 3.6.0, wdio 4.12.0.

Couldn't initialise "@wdio/selenium-standalone-service".

Hi all
I am using selenium-standalone as service ,
my conf looks like

  plugins: {
       wdio: {
         enabled: true,
         services: ['selenium-standalone']
         // additional config for service can be passed here
       },

the error

Could not load plugin wdio from module './plugin/wdio':
Couldn't initialise "@wdio/selenium-standalone-service".
Error: Cannot find module '@wdio/logger'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)

log issues

First of all thanks for this great project. This makes testing with selenium in different browsers much easier :)

Unfortunately, I found a few issues with the seleniumLogs option:

  1. it's not possible to specify a file path. Only directories are supported, otherwise the file will be created as directory if it doesn't exist yet (see L61).
  2. seleniumLogs fails on windows caused by a wrong path separator check (see L64)
  3. it should handle absolute paths

I'm happy to submit a PR to fix these issues.

A service failed in the 'onPrepare'

Someone can help me please?

CONSOLE LOG

A service failed in the 'onPrepare' hook
Error: Unable to connect to selenium
    at hasStarted (/usr/local/lib/node_modules/wdio-selenium-standalone-service/node_modules/selenium-standalone/lib/check-started.js:17:10)
    at Timer.listOnTimeout (timers.js:92:15)

Continue...

ERROR: unknown error: Chrome failed to start: crashed
 (Driver info: chromedriver=2.33.506106, platform=Mac OS X 10.13.1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.45 seconds
Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T16:15:40.131Z'
System info: host: 'macmini3.local', ip: '192.168.xx.xx', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.1', java.version: '1.8.0_151'
Driver info: driver.version: unknown
chrome
    at new RuntimeError (/usr/local/lib/node_modules/webdriverio/build/lib/utils/ErrorHandler.js:144:12)
    at Request._callback (/usr/local/lib/node_modules/webdriverio/build/lib/utils/RequestHandler.js:313:39)
    at Request.self.callback (/usr/local/lib/node_modules/webdriverio/node_modules/request/request.js:186:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/usr/local/lib/node_modules/webdriverio/node_modules/request/request.js:1163:10)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/webdriverio/node_modules/request/request.js:1085:12)
    at IncomingMessage.g (events.js:260:16)

CONFIG FILE

exports.config = {

    //
    // ==================
    // Specify Test Files
    // ==================
    // Define which test specs should run. The pattern is relative to the directory
    // from which `wdio` was called. Notice that, if you are calling `wdio` from an
    // NPM script (see https://docs.npmjs.com/cli/run-script) then the current working
    // directory is where your package.json resides, so `wdio` will be called from there.
    //
    specs: [
        './run/**/*.js'
    ],
    // Patterns to exclude.
    exclude: [
        // 'path/to/excluded/files'
    ],
    //
    // ============
    // Capabilities
    // ============
    // Define your capabilities here. WebdriverIO can run multiple capabilities at the same
    // time. Depending on the number of capabilities, WebdriverIO launches several test
    // sessions. Within your capabilities you can overwrite the spec and exclude options in
    // order to group specific specs to a specific capability.
    //
    // First, you can define how many instances should be started at the same time. Let's
    // say you have 3 different capabilities (Chrome, Firefox, and Safari) and you have
    // set maxInstances to 1; wdio will spawn 3 processes. Therefore, if you have 10 spec
    // files and you set maxInstances to 10, all spec files will get tested at the same time
    // and 30 processes will get spawned. The property handles how many capabilities
    // from the same test should run tests.
    //
    maxInstances: 10,
    //
    // If you have trouble getting all important capabilities together, check out the
    // Sauce Labs platform configurator - a great tool to configure your capabilities:
    // https://docs.saucelabs.com/reference/platforms-configurator
    //
    capabilities: [{
        // maxInstances can get overwritten per capability. So if you have an in-house Selenium
        // grid with only 5 firefox instance available you can make sure that not more than
        // 5 instance gets started at a time.
        maxInstances: 1,
        //
        browserName: 'chrome'
    }],
    //
    // ===================
    // Test Configurations
    // ===================
    // Define all options that are relevant for the WebdriverIO instance here
    //
    // By default WebdriverIO commands are executed in a synchronous way using
    // the wdio-sync package. If you still want to run your tests in an async way
    // e.g. using promises you can set the sync option to false.
    sync: true,
    //
    // Level of logging verbosity: silent | verbose | command | data | result | error
    logLevel: 'verbose',
    //
    // Enables colors for log output.
    coloredLogs: true,
    //
    // Saves a screenshot to a given path if a command fails.
    screenshotPath: './errorShots/',
    //
    // Set a base URL in order to shorten url command calls. If your url parameter starts
    // with "/", then the base url gets prepended.

    baseUrl: 'http://localhost:8181',

    //
    // Default timeout for all waitFor* commands.
    waitforTimeout: 10000,
    //
    // Default timeout in milliseconds for request
    // if Selenium Grid doesn't send response
    connectionRetryTimeout: 90000,
    //
    // Default request retries count
    connectionRetryCount: 3,
    //
    // Initialize the browser instance with a WebdriverIO plugin. The object should have the
    // plugin name as key and the desired plugin options as properties. Make sure you have
    // the plugin installed before running any tests. The following plugins are currently
    // available:
    // WebdriverCSS: https://github.com/webdriverio/webdrivercss
    // WebdriverRTC: https://github.com/webdriverio/webdriverrtc
    // Browserevent: https://github.com/webdriverio/browserevent
    // plugins: {
    //     webdrivercss: {
    //         screenshotRoot: 'my-shots',
    //         failedComparisonsRoot: 'diffs',
    //         misMatchTolerance: 0.05,
    //         screenWidth: [320,480,640,1024]
    //     },
    //     webdriverrtc: {},
    //     browserevent: {}
    // },
    //
    // Test runner services
    // Services take over a specific job you don't want to take care of. They enhance
    // your test setup with almost no effort. Unlike plugins, they don't add new
    // commands. Instead, they hook themselves up into the test process.
    services: ['selenium-standalone'],
    //
    // Framework you want to run your specs with.
    // The following are supported: Mocha, Jasmine, and Cucumber
    // see also: http://webdriver.io/guide/testrunner/frameworks.html
    //
    // Make sure you have the wdio adapter package for the specific framework installed
    // before running any tests.
    framework: 'mocha',
    //
    // Test reporter for stdout.
    // The only one supported by default is 'dot'
    // see also: http://webdriver.io/guide/testrunner/reporters.html
    // reporters: ['dot'],
    //
    // Options to be passed to Mocha.
    // See the full list at http://mochajs.org/
    mochaOpts: {
        ui: 'bdd',
        timeout: 99999999
    },
    //
    // =====
    // Hooks
    // =====
    // WebdriverIO provides several hooks you can use to interfere with the test process in order to enhance
    // it and to build services around it. You can either apply a single function or an array of
    // methods to it. If one of them returns with a promise, WebdriverIO will wait until that promise got
    // resolved to continue.
    //
    // Gets executed once before all workers get launched.
    // onPrepare: function (config, capabilities) {
    // },
    //
    // Gets executed before test execution begins. At this point you can access all global
    // variables, such as `browser`. It is the perfect place to define custom commands.
    // before: function (capabilities, specs) {
    // },
    //
    // Hook that gets executed before the suite starts
    // beforeSuite: function (suite) {
    // },
    //
    // Hook that gets executed _before_ a hook within the suite starts (e.g. runs before calling
    // beforeEach in Mocha)
    // beforeHook: function () {
    // },
    //
    // Hook that gets executed _after_ a hook within the suite starts (e.g. runs after calling
    // afterEach in Mocha)
    // afterHook: function () {
    // },
    //
    // Function to be executed before a test (in Mocha/Jasmine) or a step (in Cucumber) starts.
    // beforeTest: function (test) {
    // },
    //
    // Runs before a WebdriverIO command gets executed.
    // beforeCommand: function (commandName, args) {
    // },
    //
    // Runs after a WebdriverIO command gets executed
    // afterCommand: function (commandName, args, result, error) {
    // },
    //
    // Function to be executed after a test (in Mocha/Jasmine) or a step (in Cucumber) starts.
    // afterTest: function (test) {
    // },
    //
    // Hook that gets executed after the suite has ended
    // afterSuite: function (suite) {
    // },
    //
    // Gets executed after all tests are done. You still have access to all global variables from
    // the test.
    // after: function (result, capabilities, specs) {
    // },
    //
    // Gets executed after all workers got shut down and the process is about to exit. It is not
    // possible to defer the end of the process using a promise.
    // onComplete: function(exitCode) {
    // }
}

it won't download the selenium standalone server correctly if the second minor is double digits

The latest selenium-standalone server version is 3.141.59. So the second minor version is .59. That caused the issue when it was downloading Selenium server since the path is not correct:

A service failed in the 'onPrepare' hook
Error: Could not download https://selenium-release.storage.googleapis.com/3.1419/selenium-server-standalone-3.141.59.jar
at Request. (/Users/xcao/Desktop/qa-ui-functional/node_modules/selenium-standalone/lib/install.js:373:21)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at Request.onRequestResponse (/Users/xcao/Desktop/qa-ui-functional/node_modules/request/request.js:1066:10)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at HTTPParser.parserOnIncomingClient (_http_client.js:544:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:117:17)
at TLSSocket.socketOnData (_http_client.js:440:20)
at emitOne (events.js:116:13)

Continue...
ERROR: connect ECONNREFUSED 127.0.0.1:4444

Notice the correct download file path is https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar

in wdio.conf.js I have this seleniumArgs and installArgs:
exports.config = {
seleniumInstallArgs: { version: '3.141.0', drivers: { chrome: { version: '2.45' } } },
seleniumArgs: { version: '3.141.0', drivers: { chrome: { version: '2.45' } } },
...
}

Cannot run the service behind corporate proxy

Our proxy rules ban AWS. As the service is starting it does an attempt to download the latest selenium drivers and fails. The startup fails even when there are already some downloaded binaries from previous runs (downloaded via direct Internet access).

Proposed solution:
Make the download optional - e.g. don't reject the promise when the download fails and let Selenium run with an older driver (if exists).

If you accept such a solution I am willing to create a pull request with the change.

What is the purpose of wdio-selenium-standalone-service?

Hi,
I am not sure if I understand properly the concept of wdio-selenium-standalone-service.

When I reboot my laptop, I have to execute selenium-standalone start in order to be able to start wdio test.

However, I thought if I use wdio-selenium-standalone-service, then I don't have to run manually selenium-standalone start whenever I test with wdio.

Is this wrong?

Thanks.

Installing a specific version of Selenium

Hi, I would like to install and use a specific version of Selenium because it seems like this might solve my problem of random SocketExceptions occurring with macOS: codeceptjs/CodeceptJS#687 (comment)

What would the correct configuration look like to achieve the equivalent of this...

selenium-standalone install --version=3.4.0
selenium-standalone start --version=3.4.0

...?

Thanks for your help!

Best,
Max

ERROR: connect ECONNREFUSED

I have a job in Travis CI which is using wdio.conf.js to run several tests in Saucelabs, the configuration was working fine until it started failing intermittently several weeks ago. This is the error message:

ERROR: connect ECONNREFUSED 127.0.0.1:4445

I have tried adding to the tunnelDomains in Saucelabs config ‘localhost’ and ‘127.0.0.1’, also I have added Travis job number as tunnelIdentifier. Even I constrained the concurrency of the job, but none of these changes have worked.

I am pretty sure that this should be a trivial thing, but I have not found any reason why this started failing, so I thought that maybe this is a malfunction in wdio-selenium-standalone-service.

Session is not cleaning up all chromedriver processes

For versions 0.0.8 and 0.0.9, the test run does not shut down all 2.31-x64-chromedriver processes when finished. This does not happen when using firefox/geckodriver. When running more than one spec, multiple 2.31-x64-chromedriver processes get started but one will always remain per test run. I have tested this with 1 and 2 specs in the wdio conf.

Current workaround that works for me:

Add this to your wdio.config.js file.

afterSession: async function(){
    // workaround to make sure the chromedriver shuts down
    await browser.end().pause(1000);
},
after: async function(){
    // workaround to make sure the chromedriver shuts down
    await browser.pause(1000);
}

Do not start a server for remote hosts

It would be nice to have an additional option to exclude the selenium-standalone service from services for remote hosts or something like:

onPrepare (options) {
    let { host, services = [] } = options;

    if (!/127\.0\.0\.1|localhost|::1/.test(host)) {
        let index = services.includes('selenium-standalone');

        if (index) {
            options.services.splice(index, 1);
        }
    }
}

v0.0.8 not working on Travis (v0.0.7 works in the same environment)

My .travis.yml is:

sudo: false
language: node_js
node_js:
  - "7"
  - "6"
  - "5"
  - "4"
jdk:
  - oraclejdk8
env:
  - NODE_ENV=test CXX=g++-4.8
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8
before_install:
  - "npm install -g npm"
  - "npm install -g grunt-cli"
before_script:
  - "grunt build"

Just changing

"wdio-selenium-standalone-service": "0.0.7",

for

"wdio-selenium-standalone-service": "0.0.8",

in package.json triggers:

Running "webdriver:local" (webdriver) task
A service failed in the 'onPrepare' hook
Error: Selenium server did not start.
Another Selenium process may already be running or your java version may be out of date.
Be sure to check the official Selenium release notes for minimum required java version: https://raw.githubusercontent.com/SeleniumHQ/selenium/master/java/CHANGELOG
    at ChildProcess.errorIfNeverStarted (/home/travis/build/Memba/Memba-Blog/node_modules/selenium-standalone/lib/start.js:150:10)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:192:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
Continue...

See v0.0.7 logs (working) at https://travis-ci.org/Memba/Memba-Blog/jobs/203764038#L1688,
and v0.0.8 logs (not working) at https://travis-ci.org/Memba/Memba-Blog/jobs/203760023#L1679.

As far as the error message is concerned:

  • oraclejdk8 in .travis.yml here above should ensure this is using Java 8,
  • If another selenium process was running v0.0.7 would also be affected, which is not the case.

Often fails, but tests successfully run anyway

I often get this error message when running tests via the test runner (or programmatically) with browserName: 'phantomjs':

A service failed in the 'onPrepare' hook
Error: Selenium exited before it could start
    at ChildProcess.errorIfNeverStarted (/Users/matija/Code/test/e2e/node_modules/selenium-standalone/lib/start.js:144:15)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)

Continue...
------------------------------------------------------------------
[phantomjs #0-0] Session ID: adee4490-a812-11e6-9640-0311ac66cd91
[phantomjs #0-0] Spec: /Users/matija/Code/test/e2e/test/specs/page-title.js
[phantomjs #0-0] Running: phantomjs
[phantomjs #0-0]
[phantomjs #0-0]   fixture
[phantomjs #0-0]       ✓ has the expected page title
[phantomjs #0-0]
[phantomjs #0-0]
[phantomjs #0-0] 1 passing (0s)
[phantomjs #0-0]

I didn't notice a pattern for this, but still tests run correctly anyway. If I change browserName to firefox, Firefox starts, does nothing for a longer while, then closes. WebdriverIO outputs nothing, no test report, error message or anything.

Then (because I like breaking things) I tried uninstalling the selenium-standalone service and removing it from the config, now I didn't see the failure output, everything else was the same. I tried changing browserName: 'phantomjs' to firefox, same thing. Then tried browserName: 'foo' and still the same. The output even said Running: foo. 😆

I'm aware that Selenium errors are next to impossible to figure out, I just wanted to have this issue on the GitHubs in case someone has a similar problem or maybe even found a solution.

NSP reports vulnerability using [email protected]

When running nsp@^3.2.1 check for vulnerabilities, it reports the following vulnerability

┌────────────┬────────────────────────────────────────────────────────────────────┐
│            │ Prototype pollution attack                                         │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Name       │ hoek                                                               │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ CVSS       │ 4 (Medium)                                                         │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Installed  │ 2.16.3                                                             │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Vulnerable │ <= 4.2.0 || >= 5.0.0 < 5.0.3                                       │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Patched    │ > 4.2.0 < 5.0.0 || >= 5.0.3                                        │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Path       │ XXX > [email protected] >       │
│            │ [email protected] > [email protected] > [email protected] >         │
│            │ [email protected]                                                        │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ More Info  │ https://nodesecurity.io/advisories/566                             │
└────────────┴────────────────────────────────────────────────────────────────────┘

This vulnerability will usually not pop up when part of the devDepencies, but if nsp is setup to check devDepencies as well (as retire.js also does) - it pops up.

Setup:
[email protected]

Testscript:

    "test:security": "nsp check --preprocessor dev-dependencies --threshold 4",

And in the root folder, add this file: nsp-preprocessor-dev-depencies.js

/* eslint object-shorthand: 0 */
const pkg = require('../package.json');

function check(args) {
  // do something to read or generate package.json, npm-shrinkwrap.json and package-lock.json
  // the path to the project can be found as `args.path`
  // `pkg` must be the JSON parsed contents of package.json
  // `shrinkwrap` must be the JSON parsed contents of npm-shrinkwrap.json, if it exists. this may be left out.
  // `packagelock` must be the JSON parsed contents of package-lock.json, if it exists. this may also be left out.
  // return Object.assign(args, { pkg, shrinkwrap, packagelock });
  const allDeps = Object.assign({}, pkg, {
    dependencies: pkg.devDependencies,
  });
  const argsWithAllDeps = Object.assign(args, { pkg: allDeps });
  return argsWithAllDeps;
}

module.exports = {
  check,
};

ERROR: Couldn't initialise service "selenium-standalone".

Hi all
I am using selenium-standalone as service ,
my conf looks like:
capabilities: [{
maxInstances: 5,
browserName: 'chrome',
'chromeOptions': {
args: ['--no-sandbox', '--test-type=browser'],
prefs: {
download: {
'prompt_for_download': false,
'directory_upgrade': true,
'default_directory': './tmp/'
}
}
}
}],
services: ['selenium-standalone'],
port: '4444',
path: '/',
sync: true,

my package.json:
"dependencies": {
"@wdio/selenium-standalone-service": "^5.11.2",
"chromedriver": "^2.45.0",
"wdio-chromedriver-service": "^5.0.1",
"wdio-jasmine-framework": "^0.3.8",
"wdio-junit-reporter": "^0.4.4",
"wdio-spec-reporter": "^0.1.5",
"webdriverio": "4.13.2"
}
and getting this error:
ERROR: Couldn't initialise service "selenium-standalone".
Error: Cannot find module 'wdio-selenium-standalone-service'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
at Function.Module._load (internal/modules/cjs/loader.js:520:25)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Runner.initialiseServices (/usr/local/lib/node_modules/webdriverio/build/lib/runner.js:689:35)
at Runner._callee$ (/usr/local/lib/node_modules/webdriverio/build/lib/runner.js:94:38)
at tryCatch (/usr/local/lib/node_modules/webdriverio/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/usr/local/lib/node_modules/webdriverio/node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/webdriverio/node_modules/regenerator-runtime/runtime.js:114:21)
at step (/usr/local/lib/node_modules/webdriverio/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)

Selenium Service Does Not Start

Environment:
OS X 10.11.4

jiracheta$ node_modules/.bin/wdio Mustang/wdio.conf.js 
ERROR: Couldn't connect to selenium server
firefox
    at new RuntimeError (/Users/jiracheta/robo-tester/node_modules/webdriverio/build/lib/utils/ErrorHandler.js:115:12)
    at Request._callback (/Users/jiracheta/robo-tester/node_modules/webdriverio/build/lib/utils/RequestHandler.js:264:37)
    at self.callback (/Users/jiracheta/robo-tester/node_modules/webdriverio/node_modules/request/request.js:373:22)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:166:7)
    at Request.onRequestError (/Users/jiracheta/robo-tester/node_modules/webdriverio/node_modules/request/request.js:971:8)
    at emitOne (events.js:77:13)
    at ClientRequest.emit (events.js:166:7)
    at Socket.socketErrorListener (_http_client.js:258:9)
    at emitOne (events.js:77:13)
"dependencies": {
    "webdriverio": "^4.0.5",
    "wdio-mocha-framework": "~0.1",
    "wdio-junit-reporter": "~0.0.1",
    "wdio-allure-reporter": "~0.0.2",
    "appium": "^1.5.1",
    "chai": "^3.5.0"
  },
  "devDependencies": {
    "wdio-selenium-standalone-service": "~0.0.1"
  }
exports.config = {

    specs: [
        'Mustang/functional/tests/*.js'
    ],

    capabilities: [{
        browserName: 'firefox'
    }],

    logLevel: 'silent',

    coloredLogs: true,

    screenshotPath: 'Mustang/functional/errorShots/',

    baseUrl: 'http://google.com',

    waitforTimeout: 150000,

    connectionRetryTimeout: 90000,

    connectionRetryCount: 3,

    services: ['selenium-standalone'],

    framework: 'mocha',

    reporters: ['dot', 'junit'],
    reporterOptions: {
        outputDir: 'Mustang/functional/reports/'
    },

    mochaOpts: {
        ui: 'bdd'
    },

}

Selenium starts but doesn't work

Windows 10 x64 Enterprise

After running the test command I can see Selenium has started but it fails to run any tests and throws an unable to connect error. Any help would be much appreciated.

image

Dependencies (truncated)

  "devDependencies": {
    "mocha": "^3.3.0",
    "wdio-mocha-framework": "^0.5.10",
    "wdio-selenium-standalone-service": "0.0.8",
    "webdriverio": "^4.7.1"
  }

Gulpfile

gulp.task('test:wdio', function(cb) 
{
	var wdio = new Launcher(path.join(__dirname, 'wdio.conf.js'));

	return wdio.run(code => {
    process.exit(code);
  }, error => {
    console.error('Launcher failed to start the test', error.stacktrace);
    process.exit(1);
  });
});

Output

PS C:\Users\Z269CJBB\Documents\GitHub\xerox-drupal> gulp test
[14:37:33] Using gulpfile ~\Documents\GitHub\xerox-drupal\gulpfile.js
[14:37:33] Starting 'test:wdio'...

A service failed in the 'onPrepare' hook
Error: Unable to connect to selenium
    at Timeout.hasStarted (C:\Users\Z269CJBB\Documents\GitHub\xerox-drupal\node_modules\selenium-standalone\lib\check-started.js:17:10)
    at ontimeout (timers.js:380:14)
    at tryOnTimeout (timers.js:244:5)
    at Timer.listOnTimeout (timers.js:214:5)

Continue...

=======================================================================================
Selenium 2.0 / webdriver protocol bindings implementation with helper commands in nodejs.
For a complete list of commands, visit http://webdriver.io/api.html.
=======================================================================================

[14:38:59]  COMMAND     POST     "/wd/hub/session"
[14:38:59]  DATA                {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"maxInstan
ces":5,"browserName":"chrome","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"4.6.2","name":"webdriver
io"}}}
ERROR: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Not Found</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Not Found</h2>
<hr><p>HTTP Error 404. The requested resource is not found.</p>
</BODY></HTML>

chrome
Error: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Not Found</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Not Found</h2>
<hr><p>HTTP Error 404. The requested resource is not found.</p>
</BODY></HTML>


[14:38:59] Finished 'test:wdio' after 1.43 min

ERROR: Cannot define class using reflection on wdio start

Getting exceptions:

> wdio

ERROR: Cannot define class using reflection
chrome
    at new RuntimeError (/Users/oleksandrkhotemskyi/Documents/GitHub/automated-testing-tool/node_modules/webdriverio/build/lib/utils/ErrorHandler.js:144:12)
    at Request._callback (/Users/oleksandrkhotemskyi/Documents/GitHub/automated-testing-tool/node_modules/webdriverio/build/lib/utils/RequestHandler.js:316:39)
    at Request.self.callback (/Users/oleksandrkhotemskyi/Documents/GitHub/automated-testing-tool/node_modules/webdriverio/node_modules/request/request.js:186:22)
    at Request.emit (events.js:180:13)
    at Request.emit (domain.js:422:20)
    at Request.<anonymous> (/Users/oleksandrkhotemskyi/Documents/GitHub/automated-testing-tool/node_modules/webdriverio/node_modules/request/request.js:1163:10)
    at Request.emit (events.js:180:13)
    at Request.emit (domain.js:422:20)
    at IncomingMessage.<anonymous> (/Users/oleksandrkhotemskyi/Documents/GitHub/automated-testing-tool/node_modules/webdriverio/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:272:13)
    at IncomingMessage.emit (events.js:185:15)
    at IncomingMessage.emit (domain.js:422:20)
    at endReadableNT (_stream_readable.js:1106:12)
    at process._tickCallback (internal/process/next_tick.js:178:19)

0 steps (0 passed, 0 failed, 0 pending)

npm ERR! Test failed.  See above for more details.

I believe this might be because of too new java version:

java --version
java 10 2018-03-20
Java(TM) SE Runtime Environment 18.3 (build 10+46)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10+46, mixed mode)

Config:

exports.config = {
    specs: [
        './src/features/**/*.feature',
    ],
    capabilities: [{
        maxInstances: 1,
        browserName: 'chrome',
    }],
    sync: true,
    logLevel: 'error',
    coloredLogs: true,
    reporters: ['cucumber'],
    baseUrl: 'http://www.google.com',
    waitforTimeout: 10000,
    connectionRetryTimeout: 5000,
    connectionRetryCount: 3,
    services: ['selenium-standalone'],
    framework: 'cucumber',
    cucumberOpts: {
        require: [
            './src/steps/hooks.js',
            './src/steps/given.js',
            './src/steps/when.js',
            './src/steps/then.js',
        ],
    },
    before: function before() {
        const chai = require('chai');
        global.expect = chai.expect;
        global.assert = chai.assert;
        global.should = chai.should();
    },
};

Dependencies:

  "dependencies": {
    "wdio-screenshot": "^0.6.0",
    "wdio-spec-reporter": "^0.1.3",
    "chai": "~4.1.2",
    "wdio-cucumber-framework": "2.0.1",
    "wdio-cucumber-reporter": "0.0.2",
    "wdio-selenium-standalone-service": "~0.0.10",
    "webdriverio": "4.12.0"
  }

java.io.IOException: Error writing to server

when running script, it failed and report error:
[chrome #0-0] java.io.IOException: Error writing to server
[chrome #0-0] Error: An unknown server-side error occurred while processing the command.
[chrome #0-0] at Object.module.exports [as checkContainsText] (test/utils/check/checkContainsText.js:19:16)
[chrome #0-0] at World. (test/steps/dns.js:50:15)
[chrome #0-0] at Promise.F (node_modules/core-js/library/modules/_export.js:35:28)
[chrome #0-0] at elementIdText("0.7884895451383356-31") - getText.js:35:50

"dependencies": {
"babel-preset-es2015": "~6.24.0",
"babel-register": "~6.24.0",
"chai": "~3.5.0",
"cucumber": "^1.3.1",
"gulp": "^3.9.1",
"minimist": "^1.2.0",
"eslint-plugin-webdriverio": "^1.0.1",
"wdio-cucumber-framework": "~0.3.1",
"wdio-cucumber-reporter": "0.0.2",
"wdio-firefox-profile-service": "0.0.3",
"wdio-junit-reporter": "^0.3.0",
"wdio-sauce-service": "^0.4.0",
"wdio-selenium-standalone-service": "0.0.9",
"wdio-spec-reporter": "~0.1.0",
"webdriverio": "~4.8.0"
},
"devDependencies": {
"babel-core": "^6.18.2",
"babel-eslint": "^7.1.0",
"babel-jest": "^20.0.3",
"babel-loader": "^6.2.7",
"babel-plugin-istanbul": "^4.1.1",
"babel-preset-react": "^6.16.0",
"babel-polyfill": "~6.23.0",
"eslint": "~3.19.0",
"eslint-config-airbnb-base": "~11.1.0",
"eslint-plugin-import": "~2.2.0"
}

wdid.con.js
services: ['selenium-standalone'],

wdio-selenium-standalone-service v0.0.10 loads browserName phantomJS with chrome driver and fails

Note: The issue might be with https://github.com/vvo/selenium-standalone v6.13.0 and is reported at webdriverio/selenium-standalone#349

[09:22:28]  COMMAND	POST 	 "/wd/hub/session"
[09:22:28]  DATA		{"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"maxInstances":5,"browserName":"phantomjs","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"4.12.0","name":"webdriverio"}}}
ERROR: unknown error: Chrome failed to start: crashed
  (Driver info: chromedriver=2.36.540471 (9c759b81a907e70363c6312294d30b6ccccc2752),platform=Linux 4.14.12-041412-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.12 seconds
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'travis-job-memba-memba-blog-352740868', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.14.12-041412-generic', java.version: '1.8.0_151'
Driver info: driver.version: unknown
phantomjs
    at new RuntimeError (/home/travis/build/Memba/Memba-Blog/node_modules/webdriverio/build/lib/utils/ErrorHandler.js:144:12)
    at Request._callback (/home/travis/build/Memba/Memba-Blog/node_modules/webdriverio/build/lib/utils/RequestHandler.js:316:39)
    at Request.self.callback (/home/travis/build/Memba/Memba-Blog/node_modules/webdriverio/node_modules/request/request.js:186:22)
    at Request.emit (events.js:180:13)
    at Request.emit (domain.js:421:20)
    at Request.<anonymous> (/home/travis/build/Memba/Memba-Blog/node_modules/webdriverio/node_modules/request/request.js:1163:10)
    at Request.emit (events.js:180:13)
    at Request.emit (domain.js:421:20)
    at IncomingMessage.<anonymous> (/home/travis/build/Memba/Memba-Blog/node_modules/webdriverio/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:272:13)

Full log at https://travis-ci.org/Memba/Memba-Blog/jobs/352740868
Config at https://github.com/Memba/Memba-Blog/blob/master/wdio.conf.js

Incorrect paths in config

From @monolithed on October 19, 2016 17:53

Config

{
   seleniumLogs: '/Users/a.abashkin/workspace/mail.ru/e.mail.ru/tests/cache/logs'
}

Result

/Users/a.abashkin/workspace/mail.ru/e.mail.ru/Users/a.abashkin/workspace/mail.ru/e.mail.ru/tests/cache/logs

Expected

/Users/a.abashkin/workspace/mail.ru/e.mail.ru/tests/cache/logs

img-2016-10-19-20-52-17

Copied from original issue: webdriverio/webdriverio#1656

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.