从命令行开始,通过键入protractor conf.js
来运行量角器, 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 directory when
// protractor is called.
specs: ['animal_adoption_1.js'],
// Options to be passed to Jasmine.
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
依次运行脚本。
我的conf.js看起来像这样:
{{1}}
我得到的错误是:
JS: “C:\用户\ Shikhar的\应用程序数据\漫游\ NPM \ node_modules \量角器\ ParamProc \ conf.js”, 第2行:未捕获的JavaScript运行时异常:ReferenceError: “出口”没有定义。在 C:\用户\ Shikhar的\应用程序数据\漫游\ NPM \ node_modules \量角器\ ParamProc \ conf.js:2
我使用Eclipse Indigo作为IDE。我是否需要使用Karma来执行此操作或其他任何操作?
答案 0 :(得分:0)
您如何在Eclipse中运行测试?看起来您正在调用节点并将 open(unit=nhist,file=history,iostat=ierr)!This setting cannot exit program if file does not exist because ierr is always 0
if (ierr /=0) then
write(*,*)'!!! error#',ierr,'- Dump file not found'
stop
endif
!I used below statement, the program exits even though a file is existing
open(unit=nhist,file=history,err=700)
700 ierr=-1
if (ierr /=0) then
write(*,*)'!!! error#',ierr,'- Dump file not found'
stop
endif
作为要运行的脚本传递。
确保您正在调用conf.js
并将protractor
传递给它。