在試圖運行這個例子約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