INNER CODE UNIT · TypeScript

waitForAppTermination

blokadaorg/blokada · automation/appium/wdio/src/flows/app.ts:23

export async function waitForAppTermination(bundleId: string, timeout = 10000): Promise<void> {
  await driver.waitUntil(
    async () => {
      const state = await queryAppState(bundleId);
      return state === APP_STATE_NOT_RUNNING;
    },
    {
      timeout,
      timeoutMsg: `App ${bundleId} did not terminate within ${timeout}ms`
    }
  );
}

export async function terminateApp(bundleId: string): Promise<void> {
  try {
    await driver.execute("mobile: terminateApp", { bundleId });
  } catch (error) {
    console.warn(`terminateApp failed for ${bundleId}: ${String(error)}`);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…