Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Please update Selenium Web Driver to 3.x due to error in reading Mocha BDD tests #3943

Closed
jmcollin78 opened this issue Jan 8, 2017 · 1 comment

Comments

@jmcollin78
Copy link

jmcollin78 commented Jan 8, 2017

Hi there,

Protractor last stable release embed Selenium 2.53.x release which got a serious bug preventing BDD tests to run (SeleniumHQ/selenium#2127). Please upgrade to selenium 3.x release.

Bug report

  • Node Version: v7.4.0
  • Protractor Version: 4.0.14
  • Angular Version: not relevant
  • Browser(s): not relevant
  • Operating System and Version not relevant
  • Your protractor configuration file:
exports.config = {
    framework: 'mocha',
    // directConnect : true,
    seleniumAddress: 'http://localhost:4444/wd/hub',
    specs: ['../../../*/tests/protractor/**/*.js'],
    baseUrl: 'http://localhost:3001',
    getPageTimeout: 10000,
    allScriptsTimeout: 10000,
    mochaOpts: {
        timeout: 30000, // ms,
        reporter: 'spec',
        slow: '2000', // a test is slow if it takes over 1 sec to accomplish
        delay: true
    }
}
  • A relevant example test:
describe('Show Selenium 2.53 BDD issue :', function () {
	it('should pass', function(){
		expect(true).to.be.true;
	});
        it.skip('not be run', function () {
            expect(true).to.be.false;
        });
   });
  • Output from running the test
[19:27:20] E/launcher - Error: Error: Test `title` should be a "string" but "function" was given instead.
    at new Test (/home/vagrant/cld-apps/node_modules/mocha/lib/test.js:26:11)
    at context.it.context.specify (/home/vagrant/cld-apps/node_modules/mocha/lib/interfaces/bdd.js:86:18)
    at /home/vagrant/cld-apps/node_modules/protractor/node_modules/selenium-webdriver/testing/index.js:95:14
    at context.xit.context.xspecify.context.it.skip (/home/vagrant/cld-apps/node_modules/mocha/lib/interfaces/bdd.js:105:15)
    at Function.skip (/home/vagrant/cld-apps/node_modules/protractor/node_modules/selenium-webdriver/testing/index.js:98:14)
  • Steps to reproduce the bug
    Just run this short test.
@cnishina
Copy link
Contributor

cnishina commented Jan 8, 2017

Duplicate #3703.

@cnishina cnishina closed this as completed Jan 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants