gpt4 book ai didi

selenium - Appium/Protractor - Cordova 应用程序 - 当我尝试运行简单测试时出现以下错误 - 无法获得与 : @webview_devtools_remote_ 匹配的套接字

转载 作者:行者123 更新时间:2023-11-28 20:49:01 25 4
gpt4 key购买 nike

我正在尝试使用 Appium + Protractor 在我的混合应用程序上运行一个简单的测试,但我无法这样做,因为我收到以下错误:

Failed to get sockets matching: @webview_devtools_remote_.*15239

我正在使用 Ubuntu,并在其上安装了 Appium 和 Protractor,几乎尝试了我在互联网上找到的所有解决方案,都无法解决问题。

唯一可以“消除”错误的是将以下代码添加到功能中:

chromeOptions: {
androidPackage: "com.android.chrome"
},

但后来我只进入了应用程序,Appium 服务器就卡在了:

[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8001/wd/hub/session] with body: {"desiredCapabilities":{"chromeOption {"androidPackage":"com.android.chrome","androidUseRunningApp":true,"androidDeviceSerial":"1cdc4ed10c027ece"}}}

它根本不会启动 spec 文件。

var SpecReporter = require('jasmine-spec-reporter').SpecReporter;

exports.config = {
seleniumAddress: 'http://localhost:4723/wd/hub',
allScriptsTimeout: 50976,

specs: [
'test.js'
],

capabilities: {
platformName: 'Android',
platformVersion: '8.0.0',
deviceName: 'Galaxy S9',
app: 'path_to_app',
autoWebview: true,
browserName: '',
appPackage: 'app_package_name',
newCommandTimeout: '140',

chromeOptions: {
androidPackage: "com.android.chrome"
}
},

onPrepare: function () {
jasmine.getEnv().addReporter(new SpecReporter({displayStacktrace: 'all'}));
},

framework: 'jasmine',

jasmineNodeOpts: {
print: function () {}, //remove protractor dot reporter
defaultTimeoutInterval: 100000
}
}

最佳答案

这似乎是一个常见的 appium 问题。来自 github 的问题:https://github.com/appium/python-client/issues/255

修复:看这里:https://github.com/blutter/appium-crosswalk-fix

关于selenium - Appium/Protractor - Cordova 应用程序 - 当我尝试运行简单测试时出现以下错误 - 无法获得与 : @webview_devtools_remote_ 匹配的套接字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54671269/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com