简体   繁体   English

描述未定义,加上我的配置文件未在量角器上运行

[英]Describe is not defined plus my config file does not run on protractor

I'm trying protractor for tests, but after install and config, i tried to run and the following error occurs: 我正在尝试量角器进行测试,但是在安装和配置后,我尝试运行,并且发生以下错误:

ReferenceError: describe is not defined
at Object.<anonymous> (c:\Users\andre.mendes\WebstormProjects\piloto\piloto.js:2:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3

Here's my code: 这是我的代码:

describe('angularjs homepage', function() {
    it('should greet the named user', function() {
        browser.get('http://www.angularjs.org');

        element(by.model('yourName')).sendKeys('TheRoks');

        var greeting = element(by.binding('yourName'));

        expect(greeting.getText()).toEqual('Hello TheRoks!');
    });})

So, i tried to run my config file, but nothing happens. 因此,我尝试运行配置文件,但没有任何反应。

Start with a clean project and start playing with it. 从一个干净的项目开始并开始使用它。 I recommend you to use the yeoman generator. 我建议您使用yeoman生成器。 https://www.npmjs.org/package/generator-protractor https://www.npmjs.org/package/generator-protractor

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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