appium-uiautomator2-driver 3.5.7 → 3.6.1

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 CHANGED
@@ -1,3 +1,15 @@
1
+ ## [3.6.1](https://github.com/appium/appium-uiautomator2-driver/compare/v3.6.0...v3.6.1) (2024-06-23)
2
+
3
+ ### Miscellaneous Chores
4
+
5
+ * Bump chai and chai-as-promised ([#799](https://github.com/appium/appium-uiautomator2-driver/issues/799)) ([35734db](https://github.com/appium/appium-uiautomator2-driver/commit/35734db0225b5d4af3d2aa72c2160149c94b954b))
6
+
7
+ ## [3.6.0](https://github.com/appium/appium-uiautomator2-driver/compare/v3.5.7...v3.6.0) (2024-06-22)
8
+
9
+ ### Features
10
+
11
+ * Document injectedImageProperties capability ([#798](https://github.com/appium/appium-uiautomator2-driver/issues/798)) ([48e3255](https://github.com/appium/appium-uiautomator2-driver/commit/48e3255eff9c3c0a6cd075f2a279ed1937664844))
12
+
1
13
  ## [3.5.7](https://github.com/appium/appium-uiautomator2-driver/compare/v3.5.6...v3.5.7) (2024-06-22)
2
14
 
3
15
  ### Bug Fixes
package/README.md CHANGED
@@ -127,6 +127,7 @@ appium:avdEnv | Mapping of emulator [environment variables](https://developer.an
127
127
  appium:networkSpeed | Sets the desired network speed limit for the emulator. It is only applied if the emulator is not running before the test starts. See emulator [command line arguments](https://developer.android.com/studio/run/emulator-commandline) description for more details.
128
128
  appium:gpsEnabled | Sets whether to enable (`true`) or disable (`false`) GPS service in the Emulator. Unset by default, which means to not change the current value
129
129
  appium:isHeadless | If set to `true` then emulator starts in headless mode (e.g. no UI is shown). It is only applied if the emulator is not running before the test starts. `false` by default.
130
+ appium:injectedImageProperties | Allows adjusting of injected image properties, like size, position or rotation. The image itself is expected to be injected by [mobile: injectEmulatorCameraImage](#mobile-injectemulatorcameraimage) extension. It is also mandatory to provide this capability if you are going to use the injection feature on a newly created/resetted emulator as it __enforces emulator restart__, so it could properly reload the modified image properties. The value itself is a map, where possible keys are `size`, `position` and `rotation`. All of them are optional. If any of values is not provided then the following defaults are used: `{size: {scaleX: 1, scaleY: 1}, position: {x: 0, y: 0, z: -1.5}, rotation: {x: 0, y: 0, z: 0}}`. The `size` value contains scale multipliers for X and Y axes. The `position` contains normalized coefficients for X/Y/Z axes, where `0` means it should be centered in the viewport. Values in the `rotation` are measured in degrees respectively for X, Y and Z axis. The capability is available since the driver version 3.6.0.
130
131
 
131
132
  ### App Signing
132
133
 
@@ -1489,10 +1490,8 @@ level | 'COMPLETE' or 'MODERATE' or 'BACKGROUND' or 'UI_HIDDEN' or 'RUNNING_CRIT
1489
1490
  ### mobile: injectEmulatorCameraImage
1490
1491
 
1491
1492
  Simulates an image injection into the VirtualScene emulator camera background.
1492
- This feature only works on Android emulators.
1493
- It might be necessary to restart the camera client app after calling this extension
1494
- for the first time as it modifies global emulator's virtual scene settings.
1495
- All the further calls should seamlessly change the foreground picture to the supplied one.
1493
+ Calls to this extension should seamlessly change the foreground picture
1494
+ in the VirtualScene emulator camera view to the supplied one.
1496
1495
  This extension could, for example, be useful if you need to verify QR codes scanning
1497
1496
  by the application under test.
1498
1497
  Available since driver version 3.2.0
@@ -1503,6 +1502,36 @@ Name | Type | Required | Description | Example
1503
1502
  --- | --- | --- | --- | ---
1504
1503
  payload | string | yes | A valid base64-encoded .PNG image payload. Other image formats are not supported. This image will be shown on the virtual scene foreground as soon as you open a camera client app. | iVBORw0KGgoAAAANSUh...
1505
1504
 
1505
+ #### Required Preconditions
1506
+
1507
+ This feature only works on Android emulators.
1508
+ It is mandatory to provide a value (it could also be an empty map to use defaults) to
1509
+ the [appium:injectedImageProperties capability](#emulator-android-virtual-device)
1510
+ in order to prepare the emulator for image injection if this extension is used
1511
+ on a newly created or resetted device.
1512
+
1513
+ There is also a possiblity to perform a manual configuration of the necessary preconditions
1514
+ if you don't want to restart the emulator on session startup. For that replace the content
1515
+ of the `Toren1BD.posters` file located in `$ANDROID_HOME/emulator/resources` folder with the
1516
+ following text:
1517
+
1518
+ ```
1519
+ poster wall
1520
+ size 2 2
1521
+ position -0.807 0.320 5.316
1522
+ rotation 0 -150 0
1523
+ default poster.png
1524
+
1525
+ poster table
1526
+ size 1 1
1527
+ position 0 0 -1.5
1528
+ rotation 0 0 0
1529
+ ```
1530
+
1531
+ Save the changed file and re(start) the emulator to pick up the changes.
1532
+ You may also customize values for different image properties under `poster table` in the above
1533
+ text snippet.
1534
+
1506
1535
  ### mobile: bluetooth
1507
1536
 
1508
1537
  Allows to control the bluetooth adapter in the device under test.
@@ -1796,10 +1825,10 @@ It is worth to try out this idea if `chrome://inspect` or [mobile: getContexts](
1796
1825
  # Ruby
1797
1826
  # Change the context to WebView (Attach to a chromedriver session)
1798
1827
  driver.set_context('WEBVIEW_XYZ')
1799
-
1828
+
1800
1829
  # Get available tabs/windows in the chrome instance
1801
1830
  driver.window_handles
1802
-
1831
+
1803
1832
  # Change the tab/window in the "chrome" instance
1804
1833
  driver.switch_to.window('a window_handle name')
1805
1834
 
@@ -261,6 +261,9 @@ declare const UIAUTOMATOR2_CONSTRAINTS: {
261
261
  readonly timeZone: {
262
262
  readonly isString: true;
263
263
  };
264
+ readonly injectedImageProperties: {
265
+ readonly isObject: true;
266
+ };
264
267
  readonly launchTimeout: {
265
268
  readonly isNumber: true;
266
269
  };
@@ -1 +1 @@
1
- {"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../../lib/constraints.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCE,CAAC;AAEjC,eAAe,wBAAwB,CAAC;AAExC,MAAM,MAAM,uBAAuB,GAAG,OAAO,wBAAwB,CAAC"}
1
+ {"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../../lib/constraints.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCE,CAAC;AAEjC,eAAe,wBAAwB,CAAC;AAExC,MAAM,MAAM,uBAAuB,GAAG,OAAO,wBAAwB,CAAC"}