getCurrentActivity
Get the name of the current Android activity.
Usage​
await browser.getCurrentActivity()
Example​
getCurrentActivity.js
it('should get the current Android activity', async () => {
const activity = await browser.getCurrentActivity()
console.log('Current activity:', activity)
})
Returns​
- <
Promise<string>>returns: The name of the current Android activity
Support​
Supported platforms: Android
note
Refer to the official Appium driver documentation to see which driver versions support this command.