Javascript 描述未定义,加上我的配置文件未在量角器上运行
我正在尝试使用量角器进行测试,但在安装和配置之后,我尝试运行量角器,出现以下错误:Javascript 描述未定义,加上我的配置文件未在量角器上运行,javascript,angularjs,protractor,webstorm,Javascript,Angularjs,Protractor,Webstorm,我正在尝试使用量角器进行测试,但在安装和配置之后,我尝试运行量角器,出现以下错误: 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
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
因此,我尝试运行我的配置文件,但什么也没发生。从一个干净的项目开始,开始玩它。我建议您使用约曼发电机 谢谢,这帮了大忙。但事实证明,这是一个项目结构问题。
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!');
});})