appium-uiautomator2-driver 2.32.2 → 2.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +44 -1
- package/build/lib/constraints.d.ts +1 -19
- package/build/lib/constraints.d.ts.map +1 -1
- package/build/lib/driver.d.ts +1 -0
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +12 -1
- package/build/lib/driver.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/driver.ts +13 -1
- package/npm-shrinkwrap.json +495 -405
- package/package.json +13 -13
package/lib/driver.ts
CHANGED
|
@@ -183,6 +183,8 @@ class AndroidUiautomator2Driver
|
|
|
183
183
|
|
|
184
184
|
_hasSystemPortInCaps: boolean | undefined;
|
|
185
185
|
|
|
186
|
+
_originalIme: string | null;
|
|
187
|
+
|
|
186
188
|
mjpegStream?: mjpeg.MJpegStream;
|
|
187
189
|
|
|
188
190
|
override caps: Uiautomator2DriverCaps;
|
|
@@ -210,6 +212,7 @@ class AndroidUiautomator2Driver
|
|
|
210
212
|
this.jwpProxyActive = false;
|
|
211
213
|
this.jwpProxyAvoid = NO_PROXY;
|
|
212
214
|
this.apkStrings = {}; // map of language -> strings obj
|
|
215
|
+
this._originalIme = null;
|
|
213
216
|
|
|
214
217
|
this.settings = new DeviceSettings(
|
|
215
218
|
{ignoreUnimportantViews: false, allowInvisibleElements: false},
|
|
@@ -485,7 +488,9 @@ class AndroidUiautomator2Driver
|
|
|
485
488
|
};
|
|
486
489
|
|
|
487
490
|
// start an avd, set the language/locale, pick an emulator, etc...
|
|
488
|
-
|
|
491
|
+
if (this.opts.hideKeyboard) {
|
|
492
|
+
this._originalIme = await this.adb.defaultIME();
|
|
493
|
+
}
|
|
489
494
|
await helpers.initDevice(this.adb, this.opts);
|
|
490
495
|
|
|
491
496
|
// Prepare the device by forwarding the UiAutomator2 port
|
|
@@ -791,6 +796,13 @@ class AndroidUiautomator2Driver
|
|
|
791
796
|
this.log.info('Restoring window animation state');
|
|
792
797
|
await this.adb.setAnimationState(true);
|
|
793
798
|
}
|
|
799
|
+
if (this._originalIme) {
|
|
800
|
+
try {
|
|
801
|
+
await this.adb.setIME(this._originalIme);
|
|
802
|
+
} catch (e) {
|
|
803
|
+
this.log.warn(`Cannot restore the original IME: ${e.message}`);
|
|
804
|
+
}
|
|
805
|
+
}
|
|
794
806
|
await this.adb.stopLogcat();
|
|
795
807
|
try {
|
|
796
808
|
await this.releaseSystemPort();
|