I started creating a base test case using Mocha and Webriver. I get the following when I try and run

> mocha test

:  is not a 
at Object.<anonymous> (/Users/<username>/projects/selenium-testing/test/website_test.js:6:5)
at Module._compile (internal/modules/cjs/loader.js:678:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at .Module._load (internal/modules/cjs/loader.js:520:3)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (internal/modules/cjs/helpers.js:20:18)
at /usr/local/lib/node_modules/mocha/lib/mocha.js:253:27
at Array.forEach (<anonymous>)
at Mocha.loadFiles (/usr/local/lib/node_modules/mocha/lib/mocha.js:250:14)

My code sample:

var  = require('selenium-'),
{describe, before, after, it} = require('selenium-/testing');
By = .by,
until = .until;

describe('scenarios', function(){
  beforeEach(function(){
    var driver = new .Builder().forBrowser('chrome').build();
    driver.get('http://google.com');
  });

  afterEach(function(){
    driver.quit();
  });

  it('find google', function(){

  });

});

I am not sure how to take care of this error since I tried all
1) globally and locally installing selenium-webdriver



Source link https://sqa.stackexchange.com/questions/33432/getting-an-error-typeerror-describe-is-not-a-function

LEAVE A REPLY

Please enter your comment!
Please enter your name here