getCurrentPackage
Get the name of the current Android package.
Note: Falls back to the deprecated Appium 2 protocol endpoint if the driver does not support the
mobile:execute method.
Usage
browser.getCurrentPackage()
Example
getCurrentPackage.js
it('should get the current Android package', async () => {
const pkg = await browser.getCurrentPackage()
console.log('Current package:', pkg)
})
Returns
- <
Promise<string>>returns: The name of the current Android package
Support
nota
Refer to the official Appium driver documentation to see which driver versions support this command.