Appium 2.0 - deeplink not working
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
Bắt đầu với đường dẫn thực thi mobile: deepLink và so sánh nó với mobile: shell cùng các cách tiếp cận ADB trực tiếp được mô tả trong issue. Tái hiện trên Android 12 với Appium 2.0.0-rc.3 và Java client 8.5.1, sử dụng các log được cung cấp để xác định lỗi. Được xem là hoàn tất khi deep link điều hướng đến màn hình mong đợi hoặc issue được thu hẹp thành một giới hạn đã được tài liệu hóa của nền tảng hoặc driver.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Java
- Star
- 1.3k
- Fork
- 755
- Merge trung bình
- 5 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của appium/java-client
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
appium/java-client#2426 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
appium/java-client#2372 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
appium/java-client#2368 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 30/100
appium/java-client#2341 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
appium/java-client#2323 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của appium/java-client
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OpenAPITools/openapi-generator#25014 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
openhab/openhab-core#5847 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
apache/parquet-java#3820 ·
Maintainer thường phản hồi trong vòng 1 ngày