Hi.
i used appium client until recently. i update appium client last week to 2.2.0.
Somehow the function driver.currentActivity(); disappears.
is there anther option to get the current activity?
i try to get the name of the activity not the page source.
Hi @gilsheps ,
driver.currentActivity(); is working fine for me with 2.1.0 bindings and you can execute the following command in your code …this will return Activity Name along with other details on command prompt.
adb shell dumpsys activity recents | find "Recent #0"
output like : * Recent #0: TaskRecord{7e71ab9 #3687 A=com.android.settings U=0 sz=1}
What do you mean when you say the function sometimes disappears? Do you get a “no method” exception? Does the exception not return? If you can describe your problem further, we may be able to help you solve it.
We use it extensively on our project and while sometimes it returns the wrong value, I’ve never had a behavior I can describe as the function disappearing.