【问题标题】:Unable to start a WebDriver session in protractor for Appium无法在 Appium 的量角器中启动 WebDriver 会话
【发布时间】:2020-08-09 02:59:34
【问题描述】:

我一直在尝试建立一个 Protractor-Cucumber 框架,我计划在其中包含 appium 功能。为此,我目前正在尝试使用 Typescript 语言将我的 android 设备连接到 Visual Studio 代码。但是在启动我的 appium 服务器并运行 npm 脚本后,我收到以下错误。

> protractor-typescript-cucumber@4.0.0 test C:\Users...\Documents\autobots-protractor
> protractor typeScript/config/config.js
[12:51:39] I/launcher - Running 1 instances of WebDriver
[12:51:39] I/hosted - Using the selenium server at http://localhost:4723/wd/hub
[12:51:51] E/runner - Unable to start a WebDriver session.
[12:51:51] E/launcher - Error: UnsupportedOperationError: Not implemented yet for script.
    at Object.checkLegacyResponse (C:\Users\...\Documents\autobots-protractor\node_modules\selenium-webdriver\lib\error.js:546:15)
    at parseHttpResponse (C:\Users\...\Documents\autobots-protractor\node_modules\selenium-webdriver\lib\http.js:509:13)
    at doSend.then.response (C:\Users\...\Documents\autobots-protractor\node_modules\selenium-webdriver\lib\http.js:441:30)
    at process._tickCallback (internal/process/next_tick.js:68:7)
[12:51:51] E/launcher - Process exited with error code 100
npm ERR! Test failed.  See above for more details.

我的配置文件如下所示:

const phone ={
    browserName: '',
    platformName: 'Android',
    platformVersion:'10', 
    deviceName: 'xyz',
    app:'C:\\Users\\....\\Documents\\autobots-protractor\\App\\LGCalculator.apk', 
    appPackage: 'com.android.calculator2',
    appActivity:'com.android.calculator2.Calculator', 
    udid: 'SFD3Y184ahsdcj24', 
    automationName: 'UiAutomator2',
}
export const config: Config = {
 seleniumAddress:"http://localhost:4723/wd/hub",baseUrl:"https://www.google.com",
    multiCapabilities:[phone],
    framework: "custom",
    frameworkPath: require.resolve("protractor-cucumber-framework"),

    specs: [
        "../../features/*.feature",
    ],
services:{
        appium: {
        waitStartTime: 6000,
        waitforTimeout: 30 * 60000,
        command: 'appium',
        logFileName: 'appium.log',
        args: {
            address: 'http://0.0.0.0:4723/wd/hub',
            port: 4723,
            commandTimeout: 30 * 60000,
            sessionOverride: true,
            debugLogSpacing: true,
                },
        },
    },
}

【问题讨论】:

标签: typescript visual-studio-code protractor cucumber appium


【解决方案1】:

请参考this 问题,我现在有同样的工作正常,或者可能有一些错字。请分享完整的 Appium 服务器日志

【讨论】:

  • 确实这是我在多能力方面的一个错字,现在它按预期工作了。
猜你喜欢
  • 2018-04-09
  • 2017-12-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-11-27
  • 2017-05-29
  • 1970-01-01
  • 2020-02-02
相关资源
最近更新 更多