Not able to run basic test using webdriver IO

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Not able to run basic test using webdriver IO



I am new to webdriver I am trying to run following code


var assert = require('assert');
describe('webdriver.io page', function() {
it('should have the right title', function () {
browser.url('/');
var title = browser.getTitle();
assert.equal(title,'WebDriverIO - Selenium 2.0 javascript bindings for nodejs');

});
});



When I am trying to run $npm test it is giving me following exception


> web-wedio@1.0.0 test /Users/user_namej/Downloads/web-wedio
> wdio

A service failed in the 'onPrepare' hook
Error: Selenium exited before it could 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 (/Users/user_namej/Downloads/web-wedio/node_modules/selenium-standalone/lib/start.js:158:10)
at ChildProcess.emit (events.js:159:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)

Continue...
[23:57:43] COMMAND POST "/wd/hub/session"
ERROR: Error forwarding the new session Empty pool of VM for setup Capabilities [{rotatable=true, locationContextEnabled=true, loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@9288a03, browserName=firefox, javascriptEnabled=true, handlesAlerts=true, maxInstances=5, requestOrigins={name=webdriverio, version=4.13.1, url=http://webdriver.io}}]
firefox
at new RuntimeError (/Users/user_namej/Downloads/web-wedio/node_modules/webdriverio/build/lib/utils/ErrorHandler.js:143:12)
at Request._callback (/Users/user_namej/Downloads/web-wedio/node_modules/webdriverio/build/lib/utils/RequestHandler.js:316:39)
at Request.self.callback (/Users/user_namej/Downloads/web-wedio/node_modules/request/request.js:185:22)
at Request.emit (events.js:159:13)
at Request.<anonymous> (/Users/user_namej/Downloads/web-wedio/node_modules/request/request.js:1157:10)
at Request.emit (events.js:159:13)
at IncomingMessage.<anonymous> (/Users/user_namej/Downloads/web-wedio/node_modules/request/request.js:1079:12)
at Object.onceWrapper (events.js:254:19)
at IncomingMessage.emit (events.js:164:20)
at endReadableNT (_stream_readable.js:1062:12)



I try . to shut down server using


http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer



but it is redirecting to 500 error page,Also I tried to do it with different commands


lsof -i :4444
kill -9 $(lsof -ti tcp:4444)



Still not working.What should I do.
Please let me know if more details required




1 Answer
1



Silly question, but have you checked your java version to see if it's compatible?



If not, maybe this could help explain your problem: https://github.com/SeleniumHQ/selenium/issues/2043






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Makefile test if variable is not empty

Will Oldham

'Series' object is not callable Error / Statsmodels illegal variable name