简体   繁体   中英

'protractor' is not recognized as an internal or external command, operable program or batch file

I am able to run my protractor from a batch file (protractor conf.js) and the script is working fine I have installed my protractor globally and done environment settings too. But when I am running my batch file from eclipse after doing settings from external tool configuration .its giving error "'protractor' is not recognized as an internal or external command, operable program or batch file." My conf.js

      exports.config = {
  framework: 'jasmine',
  seleniumAddress: 'http://localhost:4444/wd/hub',
  specs: ['spec.js']
}

My spec.js

describe('Protractor Demo App', function() {
  it('should have a title', function() {
    browser.get('http://juliemr.github.io/protractor-demo/');

    expect(browser.getTitle()).toEqual('Super Calculator');
  });
});

My runner.bat

protractor conf.js

Eclipse设置运行批处理文件

If you double confirmed the global protractor install folder had in PATH environment, and it still can't work. Please try to add a PATH in Environment Tab of Eclipse run configuration, and point the PATH to global protractor install folder as following:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM