foreground
Checks if the app with the given packageName is in the foreground, re-using the applications function.
Return
True if the package is in foreground
Parameters
ui Automation
The automation instance used for automated testing
package Name
The package of the app