我能够运行 Firefox 和 Chrome(本地自动化测试),但它在一段时间前就可以运行。我在 Chrome 上尝试运行它们时遇到了一些错误。
我的版本:
- 视窗 10 64 位
- 铬版本 58
- 节点 6.10.3
我在控制台中收到以下错误(当我尝试运行 Chrome 时)ERROR: An unknown server-side error occurred while processing the command. (UnknownError:13) Chrome
:.
在控制台中运行selenium-server我得到了:os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121' Driver info: driver.version: unknown
并且:
执行:[新会话:功能 [{rotatable=true, seleniumProtocol=WebDriver, locationContextEnabled=true, loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@8ac8f23, browserName=chrome, javascriptEnabled=true, chromeOptions={args=[- -start-maximized, --start-fullscreen]}, handlesAlerts=true, maxInstances=1, requestOrigins={name**=webdriverio, version=4.6.2**, url= http://webdriver.io }}] ]) INFO - 为功能创建一个新会话 [{rotatable=true, seleniumProtocol=WebDriver, locationContextEnabled=true, loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@, browserName=chrome, javascriptEnabled=true, chromeOptions={args= [--start-maximized, --start-fullscreen]},handlesAlerts=true,maxInstances=1,requestOrigins={name=webdriverio,version=4.6.2,url= http://webdriver.io}}] 错误 - org.apache.commons.exec.ExecuteException:进程退出并出现错误:-1073741819(退出值:-1073741819)警告 - 抛出异常
我正在使用WebdriverIO,测试是用 JavaScript 编写的。
package.json内容:
dependencies": {
"chai": "3.5.0",
"chai-as-promised": "6.0.0",
"chai-string": "1.3.0",
"chai-subset": "1.5.0",
"chai-things": "0.2.0",
"jsonfile": "3.0.0",
"moment": "2.18.1",
"node-gyp": "3.6.1",
"node-ninja": "1.0.2",
"node-uuid": "1.4.8",
"webdriverio": "4.8.0"
},
"peerDependencies": {
"mocha": "^3"
},
"devDependencies": {
"babel-cli": "6.24.1",
"babel-core": "6.24.1",
"babel-plugin-transform-object-rest-spread": "6.23.0",
"babel-plugin-transform-runtime": "6.23.0",
"babel-preset-es2015": "6.24.1",
"babel-register": "6.24.1",
"chromedriver": "2.29.0",
"cross-env": "4.0.0",
"eslint": "^3.19.0",
"eslint-config-airbnb": "15.0.1",
"eslint-plugin-import": "2.2.0",
"eslint-plugin-jsx-a11y": "^5.0.1",
"eslint-plugin-react": "7.0.0",
"eslint-plugin-webdriverio": "1.0.1",
"express": "4.15.2",
"geckodriver": "1.6.1",
"marked": "0.3.6",
"marked-terminal": "2.0.0",
"mocha": "3.3.0",
"mocha-babel": "3.0.3",
"mocha-junit-reporter": "1.13.0",
"mocha-parallel-tests": "1.2.9",
"mocha-prepare": "0.0.1",
"mocha-traceur": "2.1.0",
"progress": "2.0.0",
"request": "2.81.0",
"selenium-standalone": "6.4.1",
"supertest": "3.0.0",
"tedious": "2.0.0",
"tedious-connection-pool": "1.0.5",
"uuid": "3.0.1",
"wdio-allure-reporter": "0.1.2",
"wdio-browserstack-service": "0.1.4",
"wdio-concise-reporter": "0.1.2",
"wdio-dot-reporter": "0.0.8",
"wdio-firefox-profile-service": "0.0.3",
"wdio-jasmine-framework": "0.3.1",
"wdio-json-reporter": "0.2.1",
"wdio-junit-reporter": "0.3.0",
"wdio-mocha-framework": "0.5.10",
"wdio-phantomjs-service": "0.2.2",
"wdio-sauce-service": "0.4.0",
"wdio-selenium-standalone-service": "0.0.8",
"wdio-spec-reporter": "0.1.0"
我删除了 node_modules文件夹,然后通过npm(本地)再次安装,但没有帮助。
当我将wdio.config.js从 Chrome 切换到 Firefox 时,Firefox 运行。我的一位朋友正在使用相同版本的 Chrome,并且可以正常工作。
在控制台中写的是,与package.jsonwebdriverio, version=4.6.2
中的版本不同,但我应该安装另一个版本(不是最新的),或者我该怎么做?
谢谢并恭祝安康。
更新:wdio 配置文件
pastebin com/Jd9WrH7B