You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
karma.conf.js
'use strict';
var By = require('selenium-webdriver').By,
until = require('selenium-webdriver').until,
firefox = require('selenium-webdriver/firefox');
module.exports = function(config) {
config.set({
frameworks: ['jasmine'],
// define browsers
customLaunchers: {
swd_firefox: {
base: 'SeleniumWebdriver',
browserName: 'Firefox',
getDriver: function(){
// example from https://www.npmjs.com/package/selenium-webdriver#usage
var driver = new firefox.Driver();
return driver;
}
},
},
browsers: ['swd_firefox']
});
};
13 08 2015 11:47:57.972:INFO [karma]: Karma v0.13.9 server started at http://localhost:9876/
changed name to Firefox via Selenium Webdriver
13 08 2015 11:47:58.010:INFO [launcher.selenium-webdriver]: SeleniumWebdriverBrowser (kid:94515610) created
13 08 2015 11:47:58.011:INFO [launcher]: Starting browser Firefox via Selenium Webdriver
13 08 2015 11:47:58.012:INFO [launcher.selenium-webdriver]: starting Firefox via Selenium Webdriver
13 08 2015 11:47:58.046:INFO [launcher.selenium-webdriver]: sending driver to url http://localhost:9876/?id=94515610
13 08 2015 11:48:43.840:ERROR [karma]: [Error: Timed out waiting for the WebDriver server at http://127.0.0.1:51217/hub]
Error: Timed out waiting for the WebDriver server at http://127.0.0.1:51217/hub
Thanks
EDIT :
npm install xvfb resolved my problem. Then in my karma.conf.js:
module.exports = function(config) {
var Xvfb = require('xvfb');
var xvfb = new Xvfb();
xvfb.startSync();
The text was updated successfully, but these errors were encountered:
In the current system you're expected to set up Xvfb before running Karma. E.g. ensure an xvfb deamon is running and run export DISPLAY=.. (with your display number) before invoking karma or npm test.
Hi,
What is the best practice to use karma for continuous integration?
Should we use xvfb, selenium?
I found this package npm:
https://www.npmjs.com/package/karma-selenium-webdriver-launcher
but doesn't seem to work :
13 08 2015 11:47:57.972:INFO [karma]: Karma v0.13.9 server started at http://localhost:9876/
changed name to Firefox via Selenium Webdriver
13 08 2015 11:47:58.010:INFO [launcher.selenium-webdriver]: SeleniumWebdriverBrowser (kid:94515610) created
13 08 2015 11:47:58.011:INFO [launcher]: Starting browser Firefox via Selenium Webdriver
13 08 2015 11:47:58.012:INFO [launcher.selenium-webdriver]: starting Firefox via Selenium Webdriver
13 08 2015 11:47:58.046:INFO [launcher.selenium-webdriver]: sending driver to url http://localhost:9876/?id=94515610
13 08 2015 11:48:43.840:ERROR [karma]: [Error: Timed out waiting for the WebDriver server at http://127.0.0.1:51217/hub]
Error: Timed out waiting for the WebDriver server at http://127.0.0.1:51217/hub
Thanks
EDIT :
npm install xvfb resolved my problem. Then in my karma.conf.js:
The text was updated successfully, but these errors were encountered: