INNER CODE UNIT · TypeScript
removeAppIfPresent
blokadaorg/blokada · automation/appium/wdio/src/flows/app.ts:60
export async function removeAppIfPresent(bundleId: string): Promise<void> {
try {
const isInstalled = await driver.isAppInstalled(bundleId);
if (!isInstalled) {
return;
}
await driver.removeApp(bundleId);
await waitForAppTermination(bundleId).catch(() => undefined);
} catch (error) {
console.warn(`removeAppIfPresent failed for ${bundleId}: ${String(error)}`);
}
}
export async function switchToAppViaAppSwitcher(
bundleId: string,
appLabel?: string
): Promise<void> {
const rect = await driver.getWindowRect();