在试图运行这个例子约Protractor Automation 当我点击量角器conf.js在cmd中我得到了以下错误意外标记
exports.config = {
directConnect: true,
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome'
},
// Framework to use. Jasmine is recommended.
framework: 'jasmine',
// Spec patterns are relative to the current working directly when
// protractor is called.
specs: ['joe_spec.js'],
// Options to be passed to Jasmine.
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
C:\Users\Emna\Desktop\example>protractor conf.js
Using ChromeDriver directly...
[launcher] Running 1 instances of WebDriver
[launcher] Error: SyntaxError: Unexpected token ILLEGAL
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at C:\Users\Emna\AppData\Roaming\npm\node_modules\protractor\node_modules\jasmine\lib\jasmine.js:71:5
at Array.forEach (native)
at Jasmine.loadSpecs (C:\Users\Emna\AppData\Roaming\npm\node_modules\protractor\node_modules\jasmine\lib\jasmine.js:70:18)
[launcher] Process exited with error code 100
可以你用conf.js文件更新你的问题?谢谢 –
好的,它完成了。由于 – Emna
这里是joe_spec.js文件: 描述(“输入量角器示例页面上的元素文本”),功能({ 它(“检查在文本框中显示页面上输入文本”功能( );}};}}。sendKeys(“Joe Colantonio”); element(by .model(“joeAngularText”)){0128} (text); });; }}; });() – Emna