From aed1b7f2ada583e9ab26e6219aeb00fb755f1245 Mon Sep 17 00:00:00 2001 From: hassineabd Date: Thu, 21 Aug 2025 15:10:35 +0200 Subject: [PATCH] add keyword get_current_package --- AppiumLibrary/keywords/_android_utils.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/AppiumLibrary/keywords/_android_utils.py b/AppiumLibrary/keywords/_android_utils.py index 78b532b..f1fb2a7 100644 --- a/AppiumLibrary/keywords/_android_utils.py +++ b/AppiumLibrary/keywords/_android_utils.py @@ -133,6 +133,14 @@ def get_activity(self): driver = self._current_application() return driver.current_activity + def get_current_package(self): + """Retrieves the current package on the device.\n + + *Android only.* + """ + driver = self._current_application() + return driver.current_package + def wait_activity(self, activity, timeout, interval=1): """Waits for an activity: blocks until target activity presents or until the timeout is reached.\n