selenium-cucumber-js icon indicating copy to clipboard operation
selenium-cucumber-js copied to clipboard

Having two features fail to run

Open rudovjan opened this issue 8 years ago • 6 comments
trafficstars

I have a two features and if i do run

node ./node_modules/selenium-cucumber-js/index.js

I get node_modules/selenium-cucumber-js/runtime/world.js:177 The previously configured ChromeDriver service is still running. You must shut it down before you may adjust its configuration.

Expected One test ends another start

rudovjan avatar Sep 29 '17 15:09 rudovjan

This could be related to chrome driver version.

rudovjan avatar Sep 29 '17 16:09 rudovjan

Solved with my own driver.. maybe it will help to someone .. not a selenium expert

'use strict';

/**
 * Creates a Selenium WebDriver using Chrome as the browser
 * @returns {ThenableWebDriver} selenium web driver
 */

let service;

module.exports = function() {
	const webdriver = require('selenium-webdriver');
	const chrome = require('selenium-webdriver/chrome');
	const path = require('chromedriver').path;

	if (service === undefined) {
		service = new chrome.ServiceBuilder(path).build();
		chrome.setDefaultService(service);
	}

	const driver = new webdriver.Builder()
		.withCapabilities({
			browserName: 'chrome',
			javascriptEnabled: true,
			path
		})
		.build();

	return driver;
};

rudovjan avatar Sep 29 '17 16:09 rudovjan

Hi @rudovjan, please can you give the latest version a try?

john-doherty avatar Oct 03 '17 14:10 john-doherty

Hi @john-doherty , you mean latest version of your selenium-cucumber-js with using your default chrome? Or latest chromedriver?

rudovjan avatar Oct 03 '17 15:10 rudovjan

Yes, the latest version of selenium-cucumber-js

john-doherty avatar Oct 03 '17 15:10 john-doherty

@john-doherty

Just some information, I get the same error using the cucumber/cucumber-js library which I know this library uses. Anytime I have more than one scenario in a feature file.

@rudovjan Thanks for the fix.

itmayziii avatar May 25 '18 18:05 itmayziii