Appium 2.0 - deeplink not working
维护者通常 5 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 mobile: deepLink 执行路径开始,并将其与 issue 中描述的 mobile: shell 和直接使用 ADB 的方法进行比较。在 Android 12 上使用 Appium 2.0.0-rc.3 和 Java client 8.5.1 重现问题,并利用提供的日志确定故障。完成的标准是 deep link 能导航到预期屏幕,或将 issue 缩小到一个已有文档说明的平台或驱动程序限制。
由索引模型根据 Issue 内容生成。
描述
Description
Not Able to navigate to deeplink, where the same code was working proper in Appium1.x
I am using mobile command mobile: deepLink for deepLink navigation and below is the code
Environment
- Java client build version: 8.5.1
- Appium Version: 2.0.0-rc.3
- Node.js version: v14.18.0
- Mobile platform/version: Android 12
- Real device: Moto G20 Fusion
Details
Also tried below two approaches, with these also not able to navigate to the screen.
Approach - 2
protected void navigateToScreenUsingDeepLink_2(final String argsDeepLink, final String argsPkgName) {
Map<String, Object> args = new HashMap<>();
args.put("command", "am");
args.put("args", "start -W -a android.intent.action.VIEW -d \"" + argsDeepLink + "\" " + argsPkgName + "");
args.put("timeout", 30000);
args.put("includeStderr", true);
Map<String, Object> result = (Map<String, Object>) getBaseDriver().executeScript("mobile: shell", args);
log.info("DEEP-LINK STATUS " + result);
}
### Approach - 3
protected void navigateToScreenUsingDeepLink_2(final String argsDeepLink, final String argsPkgName) {
try {
Process process = Runtime.getRuntime().exec("cmd /c adb shell am start -W -a android.intent.action.VIEW -d \"" + argsDeepLink + "\" " + argsPkgName + "");
int processComplete = process.waitFor();
if (processComplete != 0) {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
String strError;
while ((strError = bufferedReader.readLine()) != null) {
log.error("Error: " + strError);
}
}
} catch (IOException | InterruptedException e) {
throw new RuntimeException(e);
}
}
Code To Reproduce Issue [ Good To Have ]
protected void navigateToScreenUsingDeepLink_1(final String argsDeepLink, final String argsPkgName) {
HashMap<String, Object> map = new HashMap<>();
map.put("url", argsDeepLink);
map.put("package", argsPkgName);
map.put("waitForLaunch", true);
Map<String, Object> result = (Map<String, Object>) getBaseDriver().executeScript("mobile: deepLink", map);
log.info("DEEP LINK RESULT " + result);
}
Exception Stacktraces
2023-06-30 08:56:46:077 [HTTP] {"script":"mobile: deepLink","args":[{"url":"https://rblDemo.page.link/qL6j","waitForLaunch":true,"package":"com.app.demo.uat"}]}
2023-06-30 08:56:46:078 [AndroidUiautomator2Driver@f92c (e7aed20b)] Calling AppiumDriver.execute() with args: ["mobile: deepLink",[{"url":"https://rblDemo.page.link/qL6j","waitForLaunch":true,"package":"com.app.demo.uat"}],"e7aed20b-2a49-48b7-9481-1bb0914b53d4"]
2023-06-30 08:56:46:078 [AppiumDriver@e57e] Plugins which can handle cmd 'execute': images
2023-06-30 08:56:46:078 [AppiumDriver@e57e] Plugin images is now handling cmd 'execute'
2023-06-30 08:56:46:079 [AppiumDriver@e57e] Executing default handling behavior for command 'execute'
2023-06-30 08:56:46:079 [AndroidUiautomator2Driver@f92c (e7aed20b)] Executing native command 'mobile: deepLink'
2023-06-30 08:56:46:080 [ADB] Running 'D:\Software_Installed\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZD2222ZKDN shell am start -W -a android.intent.action.VIEW -d https://rblDemo.page.link/qL6j com.app.demo.uat'
2023-06-30 08:56:46:631 [AndroidUiautomator2Driver@f92c (e7aed20b)] Responding to client with driver.execute() result: null
2023-06-30 08:56:46:632 [HTTP] <-- POST /wd/hub/session/e7aed20b-2a49-48b7-9481-1bb0914b53d4/execute/sync 200 555 ms - 14
Link To Appium Logs
Detailed Log: https://gist.github.com/dipakkumar1225/850f4334ce61cda6a5fbc68fb8972fd6
- 主要语言
- Java
- 星标
- 1.3k
- 派生
- 755
- 平均合并
- 5 天 14 小时
- 30 天内合并 PR
- 8
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
appium/java-client 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
appium/java-client#2426 ·
维护者通常 5 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 50/100
appium/java-client#2372 ·
维护者通常 5 天内回复
-
难度 5/5 一周以上 新手友好度 30/100
appium/java-client#2368 ·
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 30/100
appium/java-client#2341 · 1 条评论 ·
维护者通常 5 天内回复
-
难度 5/5 一周以上 新手友好度 15/100
appium/java-client#2323 ·
维护者通常 5 天内回复
查看 appium/java-client 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
redhat-developer/intellij-quarkus#1626 ·
-
Type/Bug
难度 2/5 1-3 小时 新手友好度 68/100
wso2/product-integrator-mi#5061 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
quarkiverse/quarkus-roq#1277 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
apache/logging-site#48 ·
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
apache/maven-surefire#3496 · 3 条评论 ·
维护者通常 1 天内回复