.getCurrentPackage() Suggest edits
Get the name of the current Android package.
Usage
.appium.getCurrentPackage([callback])
Example
module.exports = {
'get current package name': function (app) {
app
.appium.getCurrentPackage(function (result) {
console.log('current android package is:', result.value);
});
},
'get current package name with ES6 async/await': async function (app) {
const packageName = await app.appium.getCurrentPackage();
console.log('current android package is:', packageName);
}
};
Parameters
Name | Type | description |
---|---|---|
callback Optional |
function | Callback function which is called with the result value. |
Returns
Type | description |
---|---|
string | Name of the current package. |