gpt4 book ai didi

android - 无法启动 Appium session ,错误为 : Error: Parameter 'appPackage' is required for launching application

转载 作者:搜寻专家 更新时间:2023-11-01 07:59:25 27 4
gpt4 key购买 nike

我在 ubuntu (13.10) 上运行最新版本的 appium (1.0.0-beta.1)。当我尝试运行连接到 android 模拟器的测试时,出现以下错误。

Failed to start an Appium session, err was: Error: Parameter 'appPackage' is required for launching application info: Error: Parameter 'appPackage' is required for launching application

info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Parameter 'appPackage' is required for launching application)","origValue":"Parameter 'appPackage' is required for launching application"},"sessionId":null}

最佳答案

根据以下列表匹配您的能力并使用 appium 1.0:

File appDir = new File(classpathRoot, "\\lib");
File app = new File(appDir, "Demo1.apk");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
capabilities.setCapability("deviceName","BX903HNX10");
capabilities.setCapability("platformVersion", "4.3");
capabilities.setCapability("platformName","Android");
capabilities.setCapability("app", app.getAbsolutePath());
capabilities.setCapability("appPackage", "com.gorillalogic.monkeytalk.demo1");
capabilities.setCapability("appActivity",".RootActivity");
driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

关于android - 无法启动 Appium session ,错误为 : Error: Parameter 'appPackage' is required for launching application,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23327105/

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