Skip to content

Commit 90a68b1

Browse files
fix: Tune retrieval of package launch info (#853)
1 parent 7f72dca commit 90a68b1

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

lib/driver.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -671,9 +671,13 @@ class AndroidUiautomator2Driver
671671
...caps,
672672
...sessionInfo,
673673
};
674-
// Adding AUT package name in the capabilities if package name not exist in caps
675-
if (!capsWithSessionInfo.appPackage && appInfo) {
676-
capsWithSessionInfo.appPackage = appInfo.appPackage;
674+
// Adding AUT info in the capabilities if it does not exist in caps
675+
if (appInfo) {
676+
for (const capName of ['appPackage', 'appActivity']) {
677+
if (!capsWithSessionInfo[capName] && appInfo[capName]) {
678+
capsWithSessionInfo[capName] = appInfo[capName];
679+
}
680+
}
677681
}
678682

679683
await this.performSessionExecution(capsWithSessionInfo);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
},
5858
"dependencies": {
5959
"appium-adb": "^12.7.3",
60-
"appium-android-driver": "^9.14.7",
60+
"appium-android-driver": "^9.14.9",
6161
"appium-uiautomator2-server": "^7.0.24",
6262
"asyncbox": "^3.0.0",
6363
"axios": "^1.6.5",

0 commit comments

Comments
 (0)