appium-espresso-driver 2.13.1 → 2.13.2
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/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/helpers/ViewFinder.kt +2 -2
- package/espresso-server/app/src/androidTest/java/io/appium/espressoserver/lib/viewmatcher/WithXPath.kt +7 -2
- package/npm-shrinkwrap.json +16 -16
- package/package.json +1 -1
|
Binary file
|
package/espresso-server/app/src/androidTest/java/io/appium/espressoserver/lib/helpers/ViewFinder.kt
CHANGED
|
@@ -168,8 +168,8 @@ object ViewFinder {
|
|
|
168
168
|
// If we're only looking for one item that matches xpath, pass it index 0 or else
|
|
169
169
|
// Espresso throws an AmbiguousMatcherException
|
|
170
170
|
return getViews(
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
withXPath(parent, selector, if (findOne) 0 else null),
|
|
172
|
+
findOne,
|
|
173
173
|
parent
|
|
174
174
|
).map { ViewState(it) }
|
|
175
175
|
Strategy.VIEW_TAG ->
|
|
@@ -37,10 +37,15 @@ fun fetchIncludedAttributes(xpath: String): Set<AttributesEnum>? {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
fun withXPath(root: View?, xpath: String, index: Int? = null): Matcher<View> {
|
|
40
|
-
|
|
41
|
-
val matchedXPathViews = SourceDocument(root, fetchIncludedAttributes(xpath)).findViewsByXPath(xpath)
|
|
40
|
+
val matchedXPathViews = mutableListOf<View>()
|
|
42
41
|
return object : TypeSafeMatcher<View>() {
|
|
43
42
|
override fun matchesSafely(item: View): Boolean {
|
|
43
|
+
if (matchedXPathViews.isEmpty()) {
|
|
44
|
+
matchedXPathViews.addAll(
|
|
45
|
+
SourceDocument(root ?: item.rootView, fetchIncludedAttributes(xpath)).findViewsByXPath(xpath)
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
44
49
|
return if (index != null) {
|
|
45
50
|
// If index is not null, match it with the xpath in the list at the provided index
|
|
46
51
|
index < matchedXPathViews.size && matchedXPathViews[index] == item
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-espresso-driver",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.2",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "appium-espresso-driver",
|
|
9
|
-
"version": "2.13.
|
|
9
|
+
"version": "2.13.2",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@babel/runtime": "^7.4.3",
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
}
|
|
305
305
|
},
|
|
306
306
|
"node_modules/@babel/parser": {
|
|
307
|
-
"version": "7.
|
|
307
|
+
"version": "7.20.0",
|
|
308
308
|
"extraneous": true,
|
|
309
309
|
"license": "MIT",
|
|
310
310
|
"bin": {
|
|
@@ -315,10 +315,10 @@
|
|
|
315
315
|
}
|
|
316
316
|
},
|
|
317
317
|
"node_modules/@babel/runtime": {
|
|
318
|
-
"version": "7.
|
|
318
|
+
"version": "7.20.0",
|
|
319
319
|
"license": "MIT",
|
|
320
320
|
"dependencies": {
|
|
321
|
-
"regenerator-runtime": "^0.13.
|
|
321
|
+
"regenerator-runtime": "^0.13.10"
|
|
322
322
|
},
|
|
323
323
|
"engines": {
|
|
324
324
|
"node": ">=6.9.0"
|
|
@@ -1000,7 +1000,7 @@
|
|
|
1000
1000
|
}
|
|
1001
1001
|
},
|
|
1002
1002
|
"node_modules/@types/node": {
|
|
1003
|
-
"version": "18.11.
|
|
1003
|
+
"version": "18.11.7",
|
|
1004
1004
|
"license": "MIT"
|
|
1005
1005
|
},
|
|
1006
1006
|
"node_modules/@types/normalize-package-data": {
|
|
@@ -1252,7 +1252,7 @@
|
|
|
1252
1252
|
}
|
|
1253
1253
|
},
|
|
1254
1254
|
"node_modules/appium-android-driver": {
|
|
1255
|
-
"version": "5.
|
|
1255
|
+
"version": "5.7.0",
|
|
1256
1256
|
"license": "Apache-2.0",
|
|
1257
1257
|
"dependencies": {
|
|
1258
1258
|
"@babel/runtime": "^7.0.0",
|
|
@@ -1316,7 +1316,7 @@
|
|
|
1316
1316
|
}
|
|
1317
1317
|
},
|
|
1318
1318
|
"node_modules/appium-chromedriver": {
|
|
1319
|
-
"version": "5.2.
|
|
1319
|
+
"version": "5.2.5",
|
|
1320
1320
|
"hasInstallScript": true,
|
|
1321
1321
|
"license": "Apache-2.0",
|
|
1322
1322
|
"dependencies": {
|
|
@@ -2755,7 +2755,7 @@
|
|
|
2755
2755
|
}
|
|
2756
2756
|
},
|
|
2757
2757
|
"node_modules/io.appium.settings": {
|
|
2758
|
-
"version": "4.2.
|
|
2758
|
+
"version": "4.2.2",
|
|
2759
2759
|
"license": "Apache-2.0",
|
|
2760
2760
|
"engines": {
|
|
2761
2761
|
"node": ">=14",
|
|
@@ -5383,13 +5383,13 @@
|
|
|
5383
5383
|
}
|
|
5384
5384
|
},
|
|
5385
5385
|
"@babel/parser": {
|
|
5386
|
-
"version": "7.
|
|
5386
|
+
"version": "7.20.0",
|
|
5387
5387
|
"extraneous": true
|
|
5388
5388
|
},
|
|
5389
5389
|
"@babel/runtime": {
|
|
5390
|
-
"version": "7.
|
|
5390
|
+
"version": "7.20.0",
|
|
5391
5391
|
"requires": {
|
|
5392
|
-
"regenerator-runtime": "^0.13.
|
|
5392
|
+
"regenerator-runtime": "^0.13.10"
|
|
5393
5393
|
}
|
|
5394
5394
|
},
|
|
5395
5395
|
"@colors/colors": {
|
|
@@ -5863,7 +5863,7 @@
|
|
|
5863
5863
|
}
|
|
5864
5864
|
},
|
|
5865
5865
|
"@types/node": {
|
|
5866
|
-
"version": "18.11.
|
|
5866
|
+
"version": "18.11.7"
|
|
5867
5867
|
},
|
|
5868
5868
|
"@types/normalize-package-data": {
|
|
5869
5869
|
"version": "2.4.1"
|
|
@@ -6039,7 +6039,7 @@
|
|
|
6039
6039
|
}
|
|
6040
6040
|
},
|
|
6041
6041
|
"appium-android-driver": {
|
|
6042
|
-
"version": "5.
|
|
6042
|
+
"version": "5.7.0",
|
|
6043
6043
|
"requires": {
|
|
6044
6044
|
"@babel/runtime": "^7.0.0",
|
|
6045
6045
|
"appium-adb": "^9.10.9",
|
|
@@ -6087,7 +6087,7 @@
|
|
|
6087
6087
|
}
|
|
6088
6088
|
},
|
|
6089
6089
|
"appium-chromedriver": {
|
|
6090
|
-
"version": "5.2.
|
|
6090
|
+
"version": "5.2.5",
|
|
6091
6091
|
"requires": {
|
|
6092
6092
|
"@babel/runtime": "^7.0.0",
|
|
6093
6093
|
"@xmldom/xmldom": "^0.x",
|
|
@@ -7035,7 +7035,7 @@
|
|
|
7035
7035
|
}
|
|
7036
7036
|
},
|
|
7037
7037
|
"io.appium.settings": {
|
|
7038
|
-
"version": "4.2.
|
|
7038
|
+
"version": "4.2.2"
|
|
7039
7039
|
},
|
|
7040
7040
|
"ipaddr.js": {
|
|
7041
7041
|
"version": "1.9.1",
|