appium-espresso-driver 2.26.10 → 2.27.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 +14 -0
- package/README.md +43 -1
- package/build/lib/constraints.d.ts +3 -0
- package/build/lib/constraints.d.ts.map +1 -1
- package/build/lib/driver.d.ts +6 -0
- package/build/lib/driver.d.ts.map +1 -1
- package/espresso-server/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk +0 -0
- package/espresso-server/app/src/androidTest/java/io/appium/espressoserver/lib/handlers/WebAtoms.kt +14 -10
- package/npm-shrinkwrap.json +11 -11
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [2.27.1](https://github.com/appium/appium-espresso-driver/compare/v2.27.0...v2.27.1) (2023-10-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Miscellaneous Chores
|
|
5
|
+
|
|
6
|
+
* **deps-dev:** bump semantic-release from 21.1.2 to 22.0.5 ([#935](https://github.com/appium/appium-espresso-driver/issues/935)) ([0d43021](https://github.com/appium/appium-espresso-driver/commit/0d43021bac8a62a3fe4a95e9ee8293ae897af686))
|
|
7
|
+
|
|
8
|
+
## [2.27.0](https://github.com/appium/appium-espresso-driver/compare/v2.26.10...v2.27.0) (2023-10-30)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Return web atom response ([#941](https://github.com/appium/appium-espresso-driver/issues/941)) ([440a6fd](https://github.com/appium/appium-espresso-driver/commit/440a6fd98d1ec7fcc476731c1b45fce21407181b))
|
|
14
|
+
|
|
1
15
|
## [2.26.10](https://github.com/appium/appium-espresso-driver/compare/v2.26.9...v2.26.10) (2023-10-26)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -400,7 +400,49 @@ xpath | For elements lookup Xpath strategy the driver uses the same XML tree tha
|
|
|
400
400
|
|
|
401
401
|
## Platform-Specific Extensions
|
|
402
402
|
|
|
403
|
-
Beside of standard W3C APIs the driver provides the
|
|
403
|
+
Beside of standard W3C APIs the driver provides the below custom command extensions to execute platform specific scenarios. Use the following source code examples in order to invoke them from your client code:
|
|
404
|
+
|
|
405
|
+
```java
|
|
406
|
+
// Java 11+
|
|
407
|
+
var result = driver.executeScript("mobile: <methodName>", Map.of(
|
|
408
|
+
"arg1", "value1",
|
|
409
|
+
"arg2", "value2"
|
|
410
|
+
// you may add more pairs if needed or skip providing the map completely
|
|
411
|
+
// if all arguments are defined as optional
|
|
412
|
+
));
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
```js
|
|
416
|
+
// WebdriverIO
|
|
417
|
+
const result = await driver.executeScript('mobile: <methodName>', [{
|
|
418
|
+
arg1: "value1",
|
|
419
|
+
arg2: "value2",
|
|
420
|
+
}]);
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
```python
|
|
424
|
+
# Python
|
|
425
|
+
result = driver.execute_script('mobile: <methodName>', {
|
|
426
|
+
'arg1': 'value1',
|
|
427
|
+
'arg2': 'value2',
|
|
428
|
+
})
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
```ruby
|
|
432
|
+
# Ruby
|
|
433
|
+
result = @driver.execute_script 'mobile: <methodName>', {
|
|
434
|
+
arg1: 'value1',
|
|
435
|
+
arg2: 'value2',
|
|
436
|
+
}
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
```csharp
|
|
440
|
+
// Dotnet
|
|
441
|
+
object result = driver.ExecuteScript("mobile: <methodName>", new Dictionary<string, object>() {
|
|
442
|
+
{"arg1", "value1"},
|
|
443
|
+
{"arg2", "value2"}
|
|
444
|
+
});
|
|
445
|
+
```
|
|
404
446
|
|
|
405
447
|
### mobile: shell
|
|
406
448
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../../lib/constraints.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../../lib/constraints.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCD,CAAC;AAEjC,MAAM,MAAM,mBAAmB,GAAG,OAAO,oBAAoB,CAAC"}
|
package/build/lib/driver.d.ts
CHANGED
|
@@ -538,6 +538,9 @@ export class EspressoDriver extends AndroidDriver {
|
|
|
538
538
|
readonly unicodeKeyboard: {
|
|
539
539
|
readonly isBoolean: true;
|
|
540
540
|
};
|
|
541
|
+
readonly hideKeyboard: {
|
|
542
|
+
readonly isBoolean: true;
|
|
543
|
+
};
|
|
541
544
|
readonly noSign: {
|
|
542
545
|
readonly isBoolean: true;
|
|
543
546
|
};
|
|
@@ -832,6 +835,9 @@ export class EspressoDriver extends AndroidDriver {
|
|
|
832
835
|
readonly unicodeKeyboard: {
|
|
833
836
|
readonly isBoolean: true;
|
|
834
837
|
};
|
|
838
|
+
readonly hideKeyboard: {
|
|
839
|
+
readonly isBoolean: true;
|
|
840
|
+
};
|
|
835
841
|
readonly noSign: {
|
|
836
842
|
readonly isBoolean: true;
|
|
837
843
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../lib/driver.js"],"names":[],"mappings":";AAuIA;;;;;;GAMG;AACH;IAWE;;;;;;;;;;;;;;;;;;;;;;;;;;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C;IAED,kCAGC;IAGD,qCAGC;IAGD,kCAGC;IAGD,0EAYC;IAED,2BAEC;IAcD,qHAA0C;IAE1C,oDAAkC;IAClC,mDAAgC;IAChC,gDAA0B;IAC1B,yDAAwC;IAExC,mEAAsC;IACtC,yHAA4C;IAC5C,4IAAsD;IACtD,qFAAsD;IACtD,4EAAwD;IACxD,wEAAgD;IAChD,yEAAkD;IAClD,qEAA0C;IAC1C,qEAA0C;IAC1C,wEAAgD;IAChD,sEAA4C;IAE5C,0EAAoD;IACpD,kEAA4C;IAC5C,yEAAkD;IAClD,uEAAsE;IACtE,0EAAoD;IACpD,yEAAkD;IAClD,gHAA4C;IAC5C,mDAAsC;IAEtC,wHAAsD;IACtD,iJAA0C;IAC1C,0EAA0D;IAE1D,uHAAqD;IACrD,qHAAmD;IAEnD,8HAAqD;IAErD,8IAAkF;IAClF,gJAAsF;IACtF,uEAA0E;IAC1E,kEAAkE;CACnE;8BAzsBM,uBAAuB;+BAVe,mBAAmB;+BADb,eAAe"}
|
|
Binary file
|
package/espresso-server/app/src/androidTest/java/io/appium/espressoserver/lib/handlers/WebAtoms.kt
CHANGED
|
@@ -29,16 +29,16 @@ import io.appium.espressoserver.lib.model.EspressoElement
|
|
|
29
29
|
import io.appium.espressoserver.lib.model.web.WebAtomsParams
|
|
30
30
|
import io.appium.espressoserver.lib.viewmatcher.withView
|
|
31
31
|
|
|
32
|
-
class WebAtoms : RequestHandler<WebAtomsParams,
|
|
32
|
+
class WebAtoms : RequestHandler<WebAtomsParams, Any?> {
|
|
33
33
|
|
|
34
34
|
@Throws(AppiumException::class)
|
|
35
|
-
override fun handleInternal(params: WebAtomsParams):
|
|
36
|
-
var webViewInteraction:WebInteraction<*>
|
|
35
|
+
override fun handleInternal(params: WebAtomsParams): Any? {
|
|
36
|
+
var webViewInteraction: WebInteraction<*>
|
|
37
37
|
|
|
38
38
|
// TODO: Add a 'waitForDocument' feature to wait for HTML DOCUMENT to be ready
|
|
39
39
|
|
|
40
40
|
// Initialize onWebView with web view matcher (if webviewEl provided)
|
|
41
|
-
params.webviewElement.let{ webviewElement ->
|
|
41
|
+
params.webviewElement.let { webviewElement ->
|
|
42
42
|
AndroidLogger.info("Initializing webView interaction on webview with el: '$webviewElement'")
|
|
43
43
|
val viewState = EspressoElement.getCachedViewStateById(webviewElement)
|
|
44
44
|
val matcher = withView(viewState.view)
|
|
@@ -53,18 +53,22 @@ class WebAtoms : RequestHandler<WebAtomsParams, Void?> {
|
|
|
53
53
|
// Iterate through methodsChain and call the atoms
|
|
54
54
|
params.methodChain.forEach { method ->
|
|
55
55
|
val atom = invokeStaticMethod(DriverAtoms::class.java, method.atom.name, *method.atom.args) as? Atom<*>
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
?: throw InvalidArgumentException(
|
|
57
|
+
"'${method.atom.name}' did not return a valid '${Atom::class.qualifiedName}' object",
|
|
58
|
+
)
|
|
58
59
|
|
|
59
60
|
AndroidLogger.info("Calling interaction '${method.name}' with the atom '${method.atom}'")
|
|
60
61
|
|
|
61
62
|
val res = invokeInstanceMethod(webViewInteraction, method.name, atom) as? WebInteraction<*>
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
?: throw InvalidArgumentException(
|
|
64
|
+
"'${method.name}' does not return a valid '${WebInteraction::class.qualifiedName}' object",
|
|
65
|
+
)
|
|
64
66
|
|
|
65
67
|
webViewInteraction = res
|
|
66
68
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
// if you don't pass any action to perform `webViewInteraction.get()` will throw error
|
|
70
|
+
// java.lang.IllegalStateException: Perform or Check never called on this WebInteraction!
|
|
71
|
+
// when you just want to just check element existence call with `selectActiveElement` as action
|
|
72
|
+
return webViewInteraction.get()
|
|
69
73
|
}
|
|
70
74
|
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-espresso-driver",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.27.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "appium-espresso-driver",
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.27.1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"appium-adb": "^11.0.1",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"mocha": "^10.0.0",
|
|
55
55
|
"pre-commit": "^1.2.2",
|
|
56
56
|
"rimraf": "^5.0.0",
|
|
57
|
-
"semantic-release": "^
|
|
57
|
+
"semantic-release": "^22.0.5",
|
|
58
58
|
"sinon": "^17.0.0",
|
|
59
59
|
"ts-node": "^10.9.1",
|
|
60
60
|
"typescript": "^5.1.6",
|
|
@@ -1073,7 +1073,7 @@
|
|
|
1073
1073
|
}
|
|
1074
1074
|
},
|
|
1075
1075
|
"node_modules/appium-android-driver": {
|
|
1076
|
-
"version": "7.1
|
|
1076
|
+
"version": "7.2.1",
|
|
1077
1077
|
"license": "Apache-2.0",
|
|
1078
1078
|
"dependencies": {
|
|
1079
1079
|
"appium-adb": "^11.0.1",
|
|
@@ -1081,7 +1081,7 @@
|
|
|
1081
1081
|
"asyncbox": "^2.8.0",
|
|
1082
1082
|
"axios": "^1.x",
|
|
1083
1083
|
"bluebird": "^3.4.7",
|
|
1084
|
-
"io.appium.settings": "^5.
|
|
1084
|
+
"io.appium.settings": "^5.2.0",
|
|
1085
1085
|
"lodash": "^4.17.4",
|
|
1086
1086
|
"lru-cache": "^10.0.1",
|
|
1087
1087
|
"moment": "^2.24.0",
|
|
@@ -2611,7 +2611,7 @@
|
|
|
2611
2611
|
}
|
|
2612
2612
|
},
|
|
2613
2613
|
"node_modules/io.appium.settings": {
|
|
2614
|
-
"version": "5.
|
|
2614
|
+
"version": "5.2.0",
|
|
2615
2615
|
"license": "Apache-2.0",
|
|
2616
2616
|
"engines": {
|
|
2617
2617
|
"node": ">=14",
|
|
@@ -3783,6 +3783,10 @@
|
|
|
3783
3783
|
"node": ">=10"
|
|
3784
3784
|
}
|
|
3785
3785
|
},
|
|
3786
|
+
"node_modules/semver/node_modules/yallist": {
|
|
3787
|
+
"version": "4.0.0",
|
|
3788
|
+
"license": "ISC"
|
|
3789
|
+
},
|
|
3786
3790
|
"node_modules/send": {
|
|
3787
3791
|
"version": "0.18.0",
|
|
3788
3792
|
"license": "MIT",
|
|
@@ -4113,7 +4117,7 @@
|
|
|
4113
4117
|
}
|
|
4114
4118
|
},
|
|
4115
4119
|
"node_modules/streamx": {
|
|
4116
|
-
"version": "2.15.
|
|
4120
|
+
"version": "2.15.2",
|
|
4117
4121
|
"license": "MIT",
|
|
4118
4122
|
"dependencies": {
|
|
4119
4123
|
"fast-fifo": "^1.1.0",
|
|
@@ -4662,10 +4666,6 @@
|
|
|
4662
4666
|
"node": ">=10"
|
|
4663
4667
|
}
|
|
4664
4668
|
},
|
|
4665
|
-
"node_modules/yallist": {
|
|
4666
|
-
"version": "4.0.0",
|
|
4667
|
-
"license": "ISC"
|
|
4668
|
-
},
|
|
4669
4669
|
"node_modules/yaml": {
|
|
4670
4670
|
"version": "2.3.3",
|
|
4671
4671
|
"extraneous": true,
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"automated testing",
|
|
8
8
|
"android"
|
|
9
9
|
],
|
|
10
|
-
"version": "2.
|
|
10
|
+
"version": "2.27.1",
|
|
11
11
|
"author": "Appium Contributors",
|
|
12
12
|
"license": "Apache-2.0",
|
|
13
13
|
"repository": {
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"mocha": "^10.0.0",
|
|
145
145
|
"pre-commit": "^1.2.2",
|
|
146
146
|
"rimraf": "^5.0.0",
|
|
147
|
-
"semantic-release": "^
|
|
147
|
+
"semantic-release": "^22.0.5",
|
|
148
148
|
"sinon": "^17.0.0",
|
|
149
149
|
"ts-node": "^10.9.1",
|
|
150
150
|
"typescript": "^5.1.6",
|