From bbcb5cd99d2c48914376c548bb188fd28ec9fcdb Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Mon, 18 Nov 2024 12:09:51 +0100 Subject: [PATCH] feat: Add a BiDi event upon context change --- lib/driver.ts | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/driver.ts b/lib/driver.ts index 20a95f3ab..379d7274c 100644 --- a/lib/driver.ts +++ b/lib/driver.ts @@ -651,6 +651,11 @@ class AndroidUiautomator2Driver this.log.info(`Setting auto webview to context '${viewName}' with timeout ${timeout}ms`); await retryInterval(timeout / 500, 500, this.setContext.bind(this), viewName); } + + // We would like to notify about the initial context setting + if (await this.getCurrentContext() === this.defaultContextName()) { + await this.notifyBiDiContextChange(); + } } async startUiAutomator2Session( diff --git a/package.json b/package.json index 48e06260d..06b1e5c12 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ }, "dependencies": { "appium-adb": "^12.7.0", - "appium-android-driver": "^9.13.0", + "appium-android-driver": "^9.14.0", "appium-uiautomator2-server": "^7.0.24", "asyncbox": "^3.0.0", "axios": "^1.6.5",