Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Selenium 量角器:指向默认conf.js文件的PhpStorm IDE_Selenium_Protractor_Phpstorm_Webstorm - Fatal编程技术网

Selenium 量角器:指向默认conf.js文件的PhpStorm IDE

Selenium 量角器:指向默认conf.js文件的PhpStorm IDE,selenium,protractor,phpstorm,webstorm,Selenium,Protractor,Phpstorm,Webstorm,我试图在Ubuntu上的PhpStorm IDE中运行一个基本的量角器脚本。当我运行conf文件时,它抛出以下错误 Usage: protractor [configFile] [options] configFile defaults to protractor.conf.js The [options] object will override values from the config file. See the reference config for a full list of o

我试图在Ubuntu上的PhpStorm IDE中运行一个基本的量角器脚本。当我运行conf文件时,它抛出以下错误

Usage: protractor [configFile] [options]
configFile defaults to protractor.conf.js
The [options] object will override values from the config file.
See the reference config for a full list of options.

Error: Error: more than one config file specified
at /usr/local/lib/node_modules/protractor/built/cli.js:163:15
我无法理解为什么它指向默认的conf文件而不是我指定的文件

这是配置的屏幕截图

c_conf.js

exports.config = {
    seleniumAddress: 'http://localhost:4444/wd/hub', 
    specs: [spec.js],
    framework : 'jasmine',

    capabilities: {
        browserName: 'chrome'
    }
}
describe('Protractor Framework', function(){
    it('Title', function(){
        browser.get('https://www.google.com');
    })
})
spec.js

exports.config = {
    seleniumAddress: 'http://localhost:4444/wd/hub', 
    specs: [spec.js],
    framework : 'jasmine',

    capabilities: {
        browserName: 'chrome'
    }
}
describe('Protractor Framework', function(){
    it('Title', function(){
        browser.get('https://www.google.com');
    })
})

您设置错误,请参考以下屏幕截图中的设置:

  • 节点解释器
    用于指定nodejs二进制文件
  • 节点参数
    可选的,用于指定节点二进制文件的参数
  • JavaScript文件
    必须是量角器\build的
    cli.js
  • 应用程序参数
    用于指定在cmd行中键入的conf文件和参数
  • 环境变量
    是可选的

这样怎么样:1)2)我正在使用ubuntu。