使用appium,量角器,android模拟器进行自动测试。错误代码100

时间:2017-08-08 13:54:11

标签: android protractor appium

我在运行测试时遇到问题。我收到错误代码100,但我找不到问题。我在想,也许是配置,但我尝试了不同的东西,结果总是一样的。我正在使用此配置。有什么想法吗?

conf.js

exports.config = {
  seleniumAddress: 'http://localhost:4723/wd/hub',
  capabilities: {
    platformName: 'android',
    autowebview: true,
    platformVersion: '5.1',
    deviceName: 'Nexus 5X API 25',
    app: '..../android-debug.apk',
    browserName: '',
    },
  baseUrl: 'localhost:5554',
  specs: ['spec-2.js'],
  onPrepare: function () {
        var wd = require('wd'),
            protractor = require('protractor'),
            wdBridge = require('wd-bridge')(protractor, wd);
        wdBridge.initFromProtractor(exports.config);
    }
};

日志:

I/launcher - Running 1 instances of WebDriver
[09:40:06] I/hosted - Using the selenium server at http://localhost:4723/wd/hub
[09:40:11] E/runner - Unable to start a WebDriver session.
[09:40:13] E/launcher - Error: WebDriverError: An unknown server-side error occurred while processing the command. Original error: Invalid timeout 'script'
    at WebDriverError (C:\Users\xx\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:27:5)
    at Object.checkLegacyResponse (C:\Users\xx\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:505:15)
    at parseHttpResponse (C:\Users\xx\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:509:13)
    at doSend.then.response (C:\Users\xx\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:440:13)
    at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: WebDriver.manage().timeouts().setScriptTimeout(11000)
    at WebDriver.schedule (C:\Users\xx\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:816:17)
    at Timeouts._scheduleCommand (C:\Users\xx\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:1500:25)
    at Timeouts.setScriptTimeout (C:\Users\xx\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:1483:17)
    at browser_.ready.browser_.ready.then.then (C:\Users\xx\AppData\Roaming\npm\node_modules\protractor\lib\runner.ts:281:49)
    at ManagedPromise.invokeCallback_ (C:\Users\xx\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1366:14)
    at TaskQueue.execute_ (C:\Users\xx\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2970:14)
    at TaskQueue.executeNext_ (C:\Users\xx\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2953:27)
    at asyncRun (C:\Users\xx\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2813:27)
    at C:\Users\xx\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:676:7
    at process._tickCallback (internal/process/next_tick.js:109:7)
[09:40:13] E/launcher - Process exited with error code 100

0 个答案:

没有答案