`getCurrentPackage()` giving `activity: [object Promise]` instead of actual app package

Hi Team,

I’m using appium-flutter-driver & webdriverIO to automate the flutter mobile app.

I have a use case in my application where clicking on

  • Mail us button opens Gmail app with subject, body

I want assert/verify that gmail app is opened by

  • verifying that gmail app package name

So, i’m using

const package = driver.getCurrentPackage()
console.log('package: ' + package)

its returning

activity: [object Promise]

instead of of actual app package like com.google.android.gm