appium-espresso-driver 10.2.1 → 10.4.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 +16 -0
- package/build/lib/commands/orientation.d.ts +33 -0
- package/build/lib/commands/orientation.d.ts.map +1 -0
- package/build/lib/commands/orientation.js +34 -0
- package/build/lib/commands/orientation.js.map +1 -0
- package/build/lib/commands/server/builder.d.ts +9 -0
- package/build/lib/commands/server/builder.d.ts.map +1 -1
- package/build/lib/commands/server/builder.js +23 -0
- package/build/lib/commands/server/builder.js.map +1 -1
- package/build/lib/commands/server/hints.d.ts +28 -0
- package/build/lib/commands/server/hints.d.ts.map +1 -0
- package/build/lib/commands/server/hints.js +54 -0
- package/build/lib/commands/server/hints.js.map +1 -0
- package/build/lib/commands/server/runner.d.ts +7 -0
- package/build/lib/commands/server/runner.d.ts.map +1 -1
- package/build/lib/commands/server/runner.js +43 -4
- package/build/lib/commands/server/runner.js.map +1 -1
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +13 -0
- package/build/lib/driver.js.map +1 -1
- package/build/lib/execute-method-map.d.ts +4 -0
- package/build/lib/execute-method-map.d.ts.map +1 -1
- package/espresso-server/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk +0 -0
- package/espresso-server/app/build.gradle.kts +91 -1
- package/espresso-server/app/src/androidTestShaded/AndroidManifest.xml +16 -0
- package/espresso-server/buildSrc/.gradle/9.7.1/executionHistory/executionHistory.bin +0 -0
- package/espresso-server/buildSrc/.gradle/9.7.1/executionHistory/executionHistory.lock +0 -0
- package/espresso-server/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/espresso-server/buildSrc/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/espresso-server/buildSrc/build/classes/kotlin/main/META-INF/buildSrc.kotlin_module +0 -0
- package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/AnnotationSkipper$visitField$1$1.class +0 -0
- package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/AnnotationSkipper$visitMethod$1$1.class +0 -0
- package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/AnnotationSkipper.class +0 -0
- package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/MemberRef.class +0 -0
- package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/PrefixRemapper.class +0 -0
- package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocateClassesTask$run$$inlined$groupingBy$1.class +0 -0
- package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocateClassesTask$run$$inlined$sortedByDescending$1.class +0 -0
- package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocateClassesTask$run$9$1.class +0 -0
- package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocateClassesTask$run$remapper$1.class +0 -0
- package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocateClassesTask.class +0 -0
- package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocationKt$memberReferences$1$visitMethod$1.class +0 -0
- package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocationKt$memberReferences$1.class +0 -0
- package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocationKt$referencedClasses$collector$1.class +0 -0
- package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocationKt$shareNonPublicDependents$Declared.class +0 -0
- package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocationKt.class +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab +1 -1
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/espresso-server/buildSrc/build/libs/buildSrc.jar +0 -0
- package/espresso-server/buildSrc/build.gradle.kts +6 -0
- package/espresso-server/buildSrc/src/main/kotlin/io/appium/espressoserver/gradle/RelocateClassesTask.kt +141 -0
- package/espresso-server/buildSrc/src/main/kotlin/io/appium/espressoserver/gradle/Relocation.kt +342 -0
- package/espresso-server/buildSrc/src/test/kotlin/io/appium/espressoserver/gradle/RelocationTest.kt +186 -0
- package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/handlers/ListIdlingResources.kt +2 -1
- package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/ShadingHelpers.kt +45 -0
- package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/Version.kt +1 -1
- package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/http/response/AppiumResponse.kt +3 -2
- package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/model/HamcrestMatcher.kt +8 -5
- package/espresso-server/library/src/test/java/io/appium/espressoserver/test/helpers/ShadingHelpersTest.kt +37 -0
- package/lib/commands/orientation.ts +49 -0
- package/lib/commands/server/builder.ts +29 -0
- package/lib/commands/server/hints.ts +69 -0
- package/lib/commands/server/runner.ts +53 -5
- package/lib/driver.ts +14 -0
- package/node_modules/appium-adb/CHANGELOG.md +7 -0
- package/node_modules/appium-adb/package.json +3 -3
- package/node_modules/appium-android-driver/CHANGELOG.md +74 -0
- package/node_modules/appium-android-driver/build/lib/commands/bidi/helpers.d.ts +10 -0
- package/node_modules/appium-android-driver/build/lib/commands/bidi/helpers.d.ts.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/bidi/helpers.js +15 -0
- package/node_modules/appium-android-driver/build/lib/commands/bidi/helpers.js.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/bidi/logcat-level.d.ts +9 -0
- package/node_modules/appium-android-driver/build/lib/commands/bidi/logcat-level.d.ts.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/bidi/logcat-level.js +37 -0
- package/node_modules/appium-android-driver/build/lib/commands/bidi/logcat-level.js.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/device/common.d.ts.map +1 -1
- package/node_modules/appium-android-driver/build/lib/commands/device/common.js +2 -0
- package/node_modules/appium-android-driver/build/lib/commands/device/common.js.map +1 -1
- package/node_modules/appium-android-driver/build/lib/commands/find.js +2 -2
- package/node_modules/appium-android-driver/build/lib/commands/find.js.map +1 -1
- package/node_modules/appium-android-driver/build/lib/commands/log.d.ts +4 -0
- package/node_modules/appium-android-driver/build/lib/commands/log.d.ts.map +1 -1
- package/node_modules/appium-android-driver/build/lib/commands/log.js +7 -1
- package/node_modules/appium-android-driver/build/lib/commands/log.js.map +1 -1
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.d.ts +3 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.d.ts.map +1 -1
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.js +4 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.js.map +1 -1
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.d.ts +10 -4
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.d.ts.map +1 -1
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.js +38 -20
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.js.map +1 -1
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.d.ts +34 -2
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.d.ts.map +1 -1
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.js +89 -43
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.js.map +1 -1
- package/node_modules/appium-android-driver/build/lib/driver.d.ts +5 -0
- package/node_modules/appium-android-driver/build/lib/driver.d.ts.map +1 -1
- package/node_modules/appium-android-driver/build/lib/driver.js +1 -0
- package/node_modules/appium-android-driver/build/lib/driver.js.map +1 -1
- package/node_modules/appium-android-driver/build/lib/execute-method-map.d.ts +4 -0
- package/node_modules/appium-android-driver/build/lib/execute-method-map.d.ts.map +1 -1
- package/node_modules/appium-android-driver/build/lib/execute-method-map.js +5 -0
- package/node_modules/appium-android-driver/build/lib/execute-method-map.js.map +1 -1
- package/node_modules/appium-android-driver/lib/commands/bidi/helpers.ts +16 -0
- package/node_modules/appium-android-driver/lib/commands/bidi/logcat-level.ts +40 -0
- package/node_modules/appium-android-driver/lib/commands/device/common.ts +2 -0
- package/node_modules/appium-android-driver/lib/commands/find.ts +2 -2
- package/node_modules/appium-android-driver/lib/commands/log.ts +9 -1
- package/node_modules/appium-android-driver/lib/commands/media-stream/constants.ts +4 -0
- package/node_modules/appium-android-driver/lib/commands/media-stream/exports.ts +46 -21
- package/node_modules/appium-android-driver/lib/commands/media-stream/stream.ts +90 -43
- package/node_modules/appium-android-driver/lib/driver.ts +1 -0
- package/node_modules/appium-android-driver/lib/execute-method-map.ts +6 -0
- package/node_modules/appium-android-driver/package.json +6 -6
- package/node_modules/appium-chromedriver/CHANGELOG.md +7 -0
- package/node_modules/appium-chromedriver/config/mapping.json +1 -0
- package/node_modules/appium-chromedriver/package.json +2 -2
- package/node_modules/asyncbox/README.md +7 -3
- package/node_modules/asyncbox/build/lib/shared/errors.d.ts +18 -2
- package/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +1 -1
- package/node_modules/asyncbox/build/lib/shared/errors.js +24 -8
- package/node_modules/asyncbox/build/lib/shared/errors.js.map +1 -1
- package/node_modules/asyncbox/lib/shared/errors.ts +34 -8
- package/node_modules/asyncbox/package.json +1 -1
- package/node_modules/bare-buffer/CMakeLists.txt +3 -3
- package/node_modules/bare-buffer/package.json +1 -1
- package/node_modules/bare-buffer/prebuilds/android-arm/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/android-arm64/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/android-ia32/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/android-x64/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/darwin-arm64/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/darwin-x64/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/ios-arm64/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/ios-arm64-simulator/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/ios-x64-simulator/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/linux-arm64/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/linux-x64/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/win32-arm64/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/win32-x64/bare-buffer.bare +0 -0
- package/node_modules/bare-fs/package.json +2 -2
- package/node_modules/bare-fs/prebuilds/android-arm/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-ia32/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/darwin-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/darwin-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-arm64-simulator/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-x64-simulator/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/linux-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/linux-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/win32-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/win32-x64/bare-fs.bare +0 -0
- package/node_modules/bare-url/CMakeLists.txt +5 -5
- package/node_modules/bare-url/package.json +1 -1
- package/node_modules/bare-url/prebuilds/android-arm/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-ia32/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/darwin-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/darwin-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/linux-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/linux-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/win32-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/win32-x64/bare-url.bare +0 -0
- package/node_modules/ini/package.json +5 -5
- package/node_modules/io.appium.settings/CHANGELOG.md +21 -0
- package/node_modules/io.appium.settings/apks/settings_apk-debug.apk +0 -0
- package/node_modules/io.appium.settings/package.json +3 -3
- package/node_modules/plist/dist/parse-binary.d.ts.map +1 -1
- package/node_modules/plist/dist/parse-binary.js +37 -9
- package/node_modules/plist/dist/parse-binary.js.map +1 -1
- package/node_modules/plist/package.json +1 -1
- package/package.json +5 -5
- package/scripts/check-shaded-packages.mjs +106 -0
- package/scripts/lib/dependency-versions/apk-meta-inf.mjs +0 -13
- package/scripts/lib/dependency-versions/comparison.mjs +17 -47
- package/scripts/lib/dependency-versions/gradle-scan.mjs +77 -87
- package/scripts/lib/dependency-versions/index.mjs +1 -1
- package/scripts/lib/dependency-versions/report.mjs +4 -4
- package/scripts/lib/dependency-versions/tracked-modules.mjs +2 -42
- package/scripts/lib/dependency-versions/types.mjs +2 -1
- package/scripts/lib/dependency-versions/version-utils.mjs +124 -2
- package/scripts/lib/diagnose/app-input.mjs +4 -1
- package/scripts/lib/diagnose/checks/compile-sdk.mjs +6 -2
- package/scripts/lib/diagnose/checks/dependency.mjs +1 -1
- package/scripts/lib/diagnose/checks/index.mjs +0 -3
- package/scripts/lib/diagnose/checks/obfuscation.mjs +1 -1
- package/scripts/lib/diagnose/diagnosis.mjs +2 -7
- package/scripts/lib/diagnose/report.mjs +2 -2
- package/scripts/lib/diagnose/checks/androidx.mjs +0 -40
- package/scripts/lib/diagnose/checks/lifecycle-extensions.mjs +0 -23
- package/scripts/lib/diagnose/checks/startup-provider.mjs +0 -41
|
@@ -17,13 +17,14 @@
|
|
|
17
17
|
package io.appium.espressoserver.lib.handlers
|
|
18
18
|
|
|
19
19
|
import androidx.test.espresso.IdlingRegistry
|
|
20
|
+
import io.appium.espressoserver.lib.helpers.stripShadedPrefix
|
|
20
21
|
import io.appium.espressoserver.lib.model.*
|
|
21
22
|
|
|
22
23
|
class ListIdlingResources : RequestHandler<AppiumParams, List<String>> {
|
|
23
24
|
|
|
24
25
|
override fun handleInternal(params: AppiumParams): List<String> {
|
|
25
26
|
return IdlingRegistry.getInstance().resources.map {
|
|
26
|
-
it::class.java.canonicalName
|
|
27
|
+
it::class.java.canonicalName!!.stripShadedPrefix()
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
|
package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/ShadingHelpers.kt
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
* you may not use this file except in compliance with the License.
|
|
4
|
+
* See the NOTICE file distributed with this work for additional
|
|
5
|
+
* information regarding copyright ownership.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
package io.appium.espressoserver.lib.helpers
|
|
18
|
+
|
|
19
|
+
// The build relocates the bundled libraries under this package (see RelocateClassesTask)
|
|
20
|
+
const val SHADED_PACKAGE_PREFIX = "io.appium.espressoserver.shaded."
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Loads a class given by a client. Libraries bundled with the server may be relocated,
|
|
24
|
+
* so the relocated name is tried first.
|
|
25
|
+
*/
|
|
26
|
+
fun forNameShaded(name: String): Class<*> =
|
|
27
|
+
try {
|
|
28
|
+
Class.forName(SHADED_PACKAGE_PREFIX + name)
|
|
29
|
+
} catch (e: ClassNotFoundException) {
|
|
30
|
+
Class.forName(name)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Loads a class given by a client that describes the application under test, e.g. a type to match.
|
|
35
|
+
* The application's own class wins over the relocated copy of the server.
|
|
36
|
+
*/
|
|
37
|
+
fun forNameApp(name: String): Class<*> =
|
|
38
|
+
try {
|
|
39
|
+
Class.forName(name)
|
|
40
|
+
} catch (e: ClassNotFoundException) {
|
|
41
|
+
Class.forName(SHADED_PACKAGE_PREFIX + name)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Hides the relocation from the names that are shown to the user. */
|
|
45
|
+
fun String.stripShadedPrefix(): String = replace(SHADED_PACKAGE_PREFIX, "")
|
package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/Version.kt
CHANGED
|
@@ -2,6 +2,6 @@ package io.appium.espressoserver.lib.helpers
|
|
|
2
2
|
|
|
3
3
|
// This value is updated automatically by the NPM versioning script
|
|
4
4
|
// It should be in sync with the NPM module version from package.json
|
|
5
|
-
private const val VERSION = "10.
|
|
5
|
+
private const val VERSION = "10.4.0"
|
|
6
6
|
|
|
7
7
|
fun getEspressoServerVersion() = VERSION
|
|
@@ -21,6 +21,7 @@ import java.util.UUID
|
|
|
21
21
|
import fi.iki.elonen.NanoHTTPD.Response.Status
|
|
22
22
|
import io.appium.espressoserver.lib.handlers.exceptions.AppiumException
|
|
23
23
|
import io.appium.espressoserver.lib.handlers.exceptions.MESSAGE_UNKNOWN_ERROR
|
|
24
|
+
import io.appium.espressoserver.lib.helpers.stripShadedPrefix
|
|
24
25
|
|
|
25
26
|
class AppiumResponse : BaseResponse {
|
|
26
27
|
internal var value: Any? = null
|
|
@@ -41,8 +42,8 @@ class AppiumResponse : BaseResponse {
|
|
|
41
42
|
private fun formatError(e: AppiumException,
|
|
42
43
|
originalStacktrace: String): Map<String, String> = mapOf(
|
|
43
44
|
"error" to e.error(),
|
|
44
|
-
"message" to (e.message ?: MESSAGE_UNKNOWN_ERROR),
|
|
45
|
-
"stacktrace" to originalStacktrace
|
|
45
|
+
"message" to (e.message ?: MESSAGE_UNKNOWN_ERROR).stripShadedPrefix(),
|
|
46
|
+
"stacktrace" to originalStacktrace.stripShadedPrefix()
|
|
46
47
|
)
|
|
47
48
|
|
|
48
49
|
private fun init(value: Any?, sessionId: String?) {
|
package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/model/HamcrestMatcher.kt
CHANGED
|
@@ -24,6 +24,8 @@ import com.google.gson.annotations.JsonAdapter
|
|
|
24
24
|
import io.appium.espressoserver.lib.handlers.exceptions.InvalidArgumentException
|
|
25
25
|
import io.appium.espressoserver.lib.handlers.exceptions.InvalidSelectorException
|
|
26
26
|
import io.appium.espressoserver.lib.helpers.GsonParserHelpers
|
|
27
|
+
import io.appium.espressoserver.lib.helpers.forNameApp
|
|
28
|
+
import io.appium.espressoserver.lib.helpers.forNameShaded
|
|
27
29
|
import io.appium.espressoserver.lib.helpers.ReflectionUtils.invokeStaticMethod
|
|
28
30
|
import org.hamcrest.Matcher
|
|
29
31
|
import org.hamcrest.Matchers
|
|
@@ -57,11 +59,12 @@ data class HamcrestMatcher(
|
|
|
57
59
|
className = className.take(className.length - CLASS_SUFFIX.length)
|
|
58
60
|
}
|
|
59
61
|
|
|
62
|
+
// Arguments are types of the app under test, so its classes take precedence
|
|
60
63
|
try {
|
|
61
|
-
|
|
64
|
+
forNameApp(className)
|
|
62
65
|
} catch (e: ClassNotFoundException) {
|
|
63
66
|
try {
|
|
64
|
-
|
|
67
|
+
forNameApp("java.lang.${className}")
|
|
65
68
|
} catch (e: ClassNotFoundException) {
|
|
66
69
|
it
|
|
67
70
|
}
|
|
@@ -121,13 +124,13 @@ data class HamcrestMatcher(
|
|
|
121
124
|
val className = requireValidString("class", it)
|
|
122
125
|
// Try fully casting class as fully qualified name
|
|
123
126
|
try {
|
|
124
|
-
return@let
|
|
127
|
+
return@let forNameShaded(className).kotlin
|
|
125
128
|
} catch (cnfe: ClassNotFoundException) { }
|
|
126
129
|
// If above didn't work, try prepending 'androidx.test.espresso.matcher' package name
|
|
127
130
|
try {
|
|
128
131
|
val qualifiedClassName = "androidx.test.espresso.matcher.${className}"
|
|
129
|
-
return@let
|
|
130
|
-
} catch (cnfe:
|
|
132
|
+
return@let forNameShaded(qualifiedClassName).kotlin
|
|
133
|
+
} catch (cnfe: ClassNotFoundException) {
|
|
131
134
|
throw JsonParseException("No such class found '${className}'")
|
|
132
135
|
}
|
|
133
136
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
package io.appium.espressoserver.test.helpers
|
|
2
|
+
|
|
3
|
+
import io.appium.espressoserver.lib.helpers.forNameApp
|
|
4
|
+
import io.appium.espressoserver.lib.helpers.forNameShaded
|
|
5
|
+
import io.appium.espressoserver.lib.helpers.stripShadedPrefix
|
|
6
|
+
import org.junit.Test
|
|
7
|
+
import kotlin.test.assertEquals
|
|
8
|
+
import kotlin.test.assertFailsWith
|
|
9
|
+
|
|
10
|
+
class `ShadingHelpers Test` {
|
|
11
|
+
|
|
12
|
+
@Test
|
|
13
|
+
fun `'forNameShaded' falls back to the original name`() {
|
|
14
|
+
assertEquals(String::class.java, forNameShaded("java.lang.String"))
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@Test
|
|
18
|
+
fun `'forNameShaded' throws for unknown classes`() {
|
|
19
|
+
assertFailsWith<ClassNotFoundException> { forNameShaded("no.such.Clazz") }
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@Test
|
|
23
|
+
fun `'forNameApp' prefers the original name`() {
|
|
24
|
+
assertEquals(String::class.java, forNameApp("java.lang.String"))
|
|
25
|
+
assertFailsWith<ClassNotFoundException> { forNameApp("no.such.Clazz") }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@Test
|
|
29
|
+
fun `'stripShadedPrefix' removes the relocation prefix everywhere`() {
|
|
30
|
+
assertEquals(
|
|
31
|
+
"NoActivityResumedException: androidx.test.espresso.Foo and org.hamcrest.Matchers",
|
|
32
|
+
("NoActivityResumedException: io.appium.espressoserver.shaded.androidx.test.espresso.Foo " +
|
|
33
|
+
"and io.appium.espressoserver.shaded.org.hamcrest.Matchers").stripShadedPrefix(),
|
|
34
|
+
)
|
|
35
|
+
assertEquals("io.appium.espressoserver.lib.Foo", "io.appium.espressoserver.lib.Foo".stripShadedPrefix())
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type {Orientation, Rotation} from '@appium/types';
|
|
2
|
+
|
|
3
|
+
import type {EspressoDriver} from '../driver.js';
|
|
4
|
+
|
|
5
|
+
declare module '../driver.js' {
|
|
6
|
+
interface EspressoDriver {
|
|
7
|
+
getOrientation(...args: Parameters<typeof getOrientation>): ReturnType<typeof getOrientation>;
|
|
8
|
+
setOrientation(...args: Parameters<typeof setOrientation>): ReturnType<typeof setOrientation>;
|
|
9
|
+
getRotation(...args: Parameters<typeof getRotation>): ReturnType<typeof getRotation>;
|
|
10
|
+
setRotation(...args: Parameters<typeof setRotation>): ReturnType<typeof setRotation>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Gets the current device orientation.
|
|
16
|
+
* @returns The current device orientation ('LANDSCAPE' or 'PORTRAIT').
|
|
17
|
+
*/
|
|
18
|
+
export async function getOrientation(this: EspressoDriver): Promise<Orientation> {
|
|
19
|
+
return (await this.espresso.jwproxy.command(`/orientation`, 'GET', {})) as Orientation;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Sets the device orientation.
|
|
24
|
+
* @param orientation - The desired orientation ('LANDSCAPE' or 'PORTRAIT').
|
|
25
|
+
*/
|
|
26
|
+
export async function setOrientation(this: EspressoDriver, orientation: Orientation): Promise<void> {
|
|
27
|
+
const normalizedOrientation = orientation.toUpperCase() as Orientation;
|
|
28
|
+
await this.espresso.jwproxy.command(`/orientation`, 'POST', {
|
|
29
|
+
orientation: normalizedOrientation,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Gets the current device rotation.
|
|
35
|
+
* @returns Object containing the current device rotation in degrees on each axis
|
|
36
|
+
*/
|
|
37
|
+
export async function getRotation(this: EspressoDriver): Promise<Rotation> {
|
|
38
|
+
return (await this.espresso.jwproxy.command(`/rotation`, 'GET', {})) as Rotation;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Sets the device rotation.
|
|
43
|
+
* @param x - The desired rotation in degrees on the X axis
|
|
44
|
+
* @param y - The desired rotation in degrees on the Y axis
|
|
45
|
+
* @param z - The desired rotation in degrees on the Z axis
|
|
46
|
+
*/
|
|
47
|
+
export async function setRotation(this: EspressoDriver, x: number, y: number, z: number): Promise<void> {
|
|
48
|
+
await this.espresso.jwproxy.command(`/rotation`, 'POST', {x, y, z});
|
|
49
|
+
}
|
|
@@ -50,6 +50,12 @@ export interface EspressoBuildConfiguration {
|
|
|
50
50
|
* Defaults to true when omitted.
|
|
51
51
|
*/
|
|
52
52
|
composeSupport?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* When false, the classes bundled with the Espresso server are not moved to a private package,
|
|
55
|
+
* so they shadow the same classes of the application under test.
|
|
56
|
+
* Defaults to true when omitted.
|
|
57
|
+
*/
|
|
58
|
+
shadeServer?: boolean;
|
|
53
59
|
additionalAppDependencies?: string[];
|
|
54
60
|
additionalAndroidTestDependencies?: string[];
|
|
55
61
|
}
|
|
@@ -72,6 +78,7 @@ export class ServerBuilder {
|
|
|
72
78
|
private readonly additionalAppDependencies: string[] = [];
|
|
73
79
|
private readonly additionalAndroidTestDependencies: string[] = [];
|
|
74
80
|
private readonly composeSupport: boolean;
|
|
81
|
+
private readonly shadeServer: boolean;
|
|
75
82
|
|
|
76
83
|
constructor(log: AppiumLogger, args: ServerBuilderOptions) {
|
|
77
84
|
this.log = log;
|
|
@@ -80,6 +87,7 @@ export class ServerBuilder {
|
|
|
80
87
|
|
|
81
88
|
const buildConfiguration = args.buildConfiguration || {};
|
|
82
89
|
this.composeSupport = buildConfiguration.composeSupport !== false;
|
|
90
|
+
this.shadeServer = buildConfiguration.shadeServer !== false;
|
|
83
91
|
|
|
84
92
|
const versionConfiguration = buildConfiguration.toolsVersions || {};
|
|
85
93
|
this.serverVersions = {} as Partial<Record<(typeof VERSION_KEYS)[number], string>>;
|
|
@@ -148,11 +156,32 @@ export class ServerBuilder {
|
|
|
148
156
|
args.push(composeArg);
|
|
149
157
|
}
|
|
150
158
|
}
|
|
159
|
+
if (!this.shadeServer) {
|
|
160
|
+
const shadeArg = buildProperty('appiumShadeServer', 'false');
|
|
161
|
+
if (shadeArg) {
|
|
162
|
+
args.push(shadeArg);
|
|
163
|
+
}
|
|
164
|
+
} else {
|
|
165
|
+
// The classes of these dependencies are not relocated, so they keep working as they do without shading
|
|
166
|
+
const sharedArg = buildProperty('appiumSharedDependencies', this.getSharedDependencyCoordinates().join(','));
|
|
167
|
+
if (sharedArg) {
|
|
168
|
+
args.push(sharedArg);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
151
171
|
args.push('app:assembleAndroidTest');
|
|
152
172
|
|
|
153
173
|
return {cmd, args};
|
|
154
174
|
}
|
|
155
175
|
|
|
176
|
+
/** `group:module` of the user declared dependencies, without versions */
|
|
177
|
+
private getSharedDependencyCoordinates(): string[] {
|
|
178
|
+
const coordinates = DEPENDENCY_PROP_NAMES.flatMap((propName) => this[propName])
|
|
179
|
+
.map((dep) => dep.trim().match(/^([\w.-]+):([\w.-]+)/))
|
|
180
|
+
.filter((match): match is RegExpMatchArray => match !== null)
|
|
181
|
+
.map((match) => `${match[1]}:${match[2]}`);
|
|
182
|
+
return [...new Set(coordinates)];
|
|
183
|
+
}
|
|
184
|
+
|
|
156
185
|
private async setGradleWrapperVersion(version: string): Promise<void> {
|
|
157
186
|
const propertiesPath = path.resolve(this.serverPath, 'gradle', 'wrapper', 'gradle-wrapper.properties');
|
|
158
187
|
const originalProperties = await fs.readFile(propertiesPath, 'utf8');
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
const DOCS_URL = 'https://appium.github.io/appium-espresso-driver/latest/troubleshooting/class-conflicts/';
|
|
2
|
+
const REPORT = 'Please report this as a bug, and attach the logcat crash buffer and your espressoBuildConfig';
|
|
3
|
+
const SHADE_OFF = '"appium:espressoBuildConfig": {"shadeServer": false}';
|
|
4
|
+
|
|
5
|
+
export interface Hint {
|
|
6
|
+
/** Matches the failure text (instrumentation output, logcat crash buffer, server error) */
|
|
7
|
+
pattern: RegExp;
|
|
8
|
+
/** Anchor of the row that documents the pattern in docs/troubleshooting/class-conflicts.md */
|
|
9
|
+
anchor: string;
|
|
10
|
+
hint: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Only the patterns that have been reproduced are listed here. Every one of them must have
|
|
15
|
+
* a row with the same anchor in the class conflicts troubleshooting page.
|
|
16
|
+
*/
|
|
17
|
+
export const HINTS: readonly Hint[] = [
|
|
18
|
+
{
|
|
19
|
+
pattern: /IllegalAccessError.*io\.appium\.espressoserver\.shaded/s,
|
|
20
|
+
anchor: 'illegal-access-shaded',
|
|
21
|
+
hint: `The server relocation has failed. ${REPORT}. As a workaround try ${SHADE_OFF}`,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
pattern: /Exception handler was not found via a ServiceLoader/,
|
|
25
|
+
anchor: 'service-loader',
|
|
26
|
+
hint: `A service file of the server was not relocated. ${REPORT}. As a workaround try ${SHADE_OFF}`,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
pattern: /StartupException.*ClassCastException.*Initializer|ViewTreeLifecycleOwner not found/s,
|
|
30
|
+
anchor: 'startup-initializer',
|
|
31
|
+
hint: `The classes shared with the application under test are not consistent. ${REPORT}. As a workaround try ${SHADE_OFF}`,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
pattern: /(NoSuchMethodError|NoClassDefFoundError)[^\n]*androidx[./]compose/,
|
|
35
|
+
anchor: 'compose-version',
|
|
36
|
+
hint:
|
|
37
|
+
'The Jetpack Compose version of the application under test differs from the one of the Espresso server. ' +
|
|
38
|
+
'Set "toolsVersions": {"composeVersion": "<version of the app>"} in the espressoBuildConfig capability. ' +
|
|
39
|
+
'If the app has no Compose, set "composeSupport": false instead',
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Finds the hints that apply to the given failure text.
|
|
45
|
+
*
|
|
46
|
+
* @param text - Failure text, e.g. the lines of an instrumentation crash.
|
|
47
|
+
* @returns Hint texts with the link to the docs, without duplicates.
|
|
48
|
+
*/
|
|
49
|
+
export function findHints(text: string): string[] {
|
|
50
|
+
return [
|
|
51
|
+
...new Set(
|
|
52
|
+
HINTS.filter(({pattern}) => pattern.test(text)).map(
|
|
53
|
+
({hint, anchor}) => `Hint: ${hint} (see ${DOCS_URL}#${anchor})`,
|
|
54
|
+
),
|
|
55
|
+
),
|
|
56
|
+
];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Appends the matching hints to an error message.
|
|
61
|
+
*
|
|
62
|
+
* @param message - The original message.
|
|
63
|
+
* @param text - Failure text to look the hints for in.
|
|
64
|
+
* @returns The message, extended with the hints if there are any.
|
|
65
|
+
*/
|
|
66
|
+
export function withHints(message: string, text: string): string {
|
|
67
|
+
const hints = findHints(text);
|
|
68
|
+
return hints.length ? `${message}\n${hints.join('\n')}` : message;
|
|
69
|
+
}
|
|
@@ -13,6 +13,9 @@ import * as semver from 'semver';
|
|
|
13
13
|
import {getPackageInfoSync, getPackageInfo, isPlainObject} from '../../utils/index.js';
|
|
14
14
|
import {ServerBuilder, buildServerSigningConfig, type ServerSigningConfig} from './builder.js';
|
|
15
15
|
import {ESPRESSO_SERVER_LAUNCH_TIMEOUT_MS, TARGET_PACKAGE_CONTAINER, TEST_APK_PKG} from './constants.js';
|
|
16
|
+
import {findHints, withHints} from './hints.js';
|
|
17
|
+
|
|
18
|
+
const MAX_OUTPUT_LINES = 500;
|
|
16
19
|
|
|
17
20
|
export interface EspressoRunnerOptions {
|
|
18
21
|
adb: ADB;
|
|
@@ -162,6 +165,36 @@ export class EspressoRunner {
|
|
|
162
165
|
return previousAppPackage !== this.appPackage;
|
|
163
166
|
}
|
|
164
167
|
|
|
168
|
+
/** Current device time in the format of `logcat -T`, or undefined if it cannot be read. */
|
|
169
|
+
private async getDeviceLogTime(): Promise<string | undefined> {
|
|
170
|
+
try {
|
|
171
|
+
return (await this.adb.shell(['date', '+%m-%d %H:%M:%S.000'])).trim() || undefined;
|
|
172
|
+
} catch (e: any) {
|
|
173
|
+
this.log.debug(`Cannot read the device time: ${e.message}`);
|
|
174
|
+
return undefined;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Appends the hints for the known failures to the message. The cause is looked for in the instrumentation
|
|
180
|
+
* output first and in the crash buffer of the device (since the given device time) after that.
|
|
181
|
+
*/
|
|
182
|
+
private async withFailureHints(message: string, outputLines: string[], since?: string): Promise<string> {
|
|
183
|
+
let failureText = outputLines.join('\n');
|
|
184
|
+
if (since && findHints(failureText).length === 0) {
|
|
185
|
+
try {
|
|
186
|
+
failureText += '\n' + (await this.adb.adbExec(['logcat', '-d', '-b', 'crash', '-T', since]));
|
|
187
|
+
} catch (e: any) {
|
|
188
|
+
this.log.debug(`Cannot read the crash buffer to look for hints: ${e.message}`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
const result = withHints(message, failureText);
|
|
192
|
+
if (result !== message) {
|
|
193
|
+
this.log.warn(result.slice(message.length + 1));
|
|
194
|
+
}
|
|
195
|
+
return result;
|
|
196
|
+
}
|
|
197
|
+
|
|
165
198
|
/**
|
|
166
199
|
* Installs Espresso server apk on to the device or emulator.
|
|
167
200
|
* Each adb command uses default timeout by them.
|
|
@@ -302,6 +335,9 @@ export class EspressoRunner {
|
|
|
302
335
|
this.log.info(`Starting Espresso Server v${manifestPayload.version} with cmd: adb ${cmd.join(' ')}`);
|
|
303
336
|
|
|
304
337
|
let hasSocketError = false;
|
|
338
|
+
const outputLines: string[] = [];
|
|
339
|
+
// Crashes that happened before this moment are not related to the launch
|
|
340
|
+
const launchTime = await this.getDeviceLogTime();
|
|
305
341
|
// start the instrumentation process
|
|
306
342
|
this.jwproxy.instrumentationState = {
|
|
307
343
|
exited: false,
|
|
@@ -320,6 +356,10 @@ export class EspressoRunner {
|
|
|
320
356
|
}
|
|
321
357
|
|
|
322
358
|
this.log.debug(`[Instrumentation] ${line.trim()}`);
|
|
359
|
+
outputLines.push(line);
|
|
360
|
+
if (outputLines.length > MAX_OUTPUT_LINES) {
|
|
361
|
+
outputLines.shift();
|
|
362
|
+
}
|
|
323
363
|
// A 'SocketException' indicates that we couldn't connect to the Espresso server,
|
|
324
364
|
// because the INTERNET permission is not set
|
|
325
365
|
if (line.toLowerCase().includes('java.net.socketexception')) {
|
|
@@ -343,8 +383,12 @@ export class EspressoRunner {
|
|
|
343
383
|
);
|
|
344
384
|
} else if (this.jwproxy.instrumentationState.exited) {
|
|
345
385
|
throw this.log.errorWithException(
|
|
346
|
-
|
|
347
|
-
`
|
|
386
|
+
await this.withFailureHints(
|
|
387
|
+
`Espresso server process has been unexpectedly terminated. ` +
|
|
388
|
+
`Check the Appium server log and the logcat output for more details`,
|
|
389
|
+
outputLines,
|
|
390
|
+
launchTime,
|
|
391
|
+
),
|
|
348
392
|
);
|
|
349
393
|
}
|
|
350
394
|
let serverStatus: ServerStatus;
|
|
@@ -363,9 +407,13 @@ export class EspressoRunner {
|
|
|
363
407
|
} catch (e: any) {
|
|
364
408
|
if (/Condition unmet/.test(e.message)) {
|
|
365
409
|
throw this.log.errorWithException(
|
|
366
|
-
|
|
367
|
-
`
|
|
368
|
-
|
|
410
|
+
await this.withFailureHints(
|
|
411
|
+
`Timed out waiting for Espresso server to be ` +
|
|
412
|
+
`online within ${this.serverLaunchTimeout}ms. The timeout value could be ` +
|
|
413
|
+
`customized using 'espressoServerLaunchTimeout' capability`,
|
|
414
|
+
outputLines,
|
|
415
|
+
launchTime,
|
|
416
|
+
),
|
|
369
417
|
);
|
|
370
418
|
}
|
|
371
419
|
throw e;
|
package/lib/driver.ts
CHANGED
|
@@ -13,6 +13,7 @@ import * as contextCmds from './commands/context.js';
|
|
|
13
13
|
import * as elementCmds from './commands/element.js';
|
|
14
14
|
import * as idlingResourcesCmds from './commands/idling-resources.js';
|
|
15
15
|
import * as miscCmds from './commands/misc.js';
|
|
16
|
+
import * as orientationCmds from './commands/orientation.js';
|
|
16
17
|
import * as screenshotCmds from './commands/screenshot.js';
|
|
17
18
|
import * as serverCmds from './commands/server/index.js';
|
|
18
19
|
import type {EspressoRunner} from './commands/server/index.js';
|
|
@@ -32,10 +33,14 @@ const NO_PROXY: RouteMatcher[] = [
|
|
|
32
33
|
['GET', new RegExp('^/session/(?!.*/)')],
|
|
33
34
|
['GET', new RegExp('^/session/[^/]+/appium/capabilities')],
|
|
34
35
|
['GET', new RegExp('^/session/[^/]+/appium/commands')],
|
|
36
|
+
['GET', new RegExp('^/session/[^/]+/appium/context')],
|
|
37
|
+
['GET', new RegExp('^/session/[^/]+/appium/contexts')],
|
|
35
38
|
['GET', new RegExp('^/session/[^/]+/appium/device/current_activity')],
|
|
36
39
|
['GET', new RegExp('^/session/[^/]+/appium/device/current_package')],
|
|
37
40
|
['GET', new RegExp('^/session/[^/]+/appium/device/display_density')],
|
|
38
41
|
['GET', new RegExp('^/session/[^/]+/appium/device/is_keyboard_shown')],
|
|
42
|
+
['GET', new RegExp('^/session/[^/]+/appium/device/orientation')],
|
|
43
|
+
['GET', new RegExp('^/session/[^/]+/appium/device/rotation')],
|
|
39
44
|
['GET', new RegExp('^/session/[^/]+/appium/device/system_bars')],
|
|
40
45
|
['GET', new RegExp('^/session/[^/]+/appium/device/system_time')],
|
|
41
46
|
['GET', new RegExp('^/session/[^/]+/appium/extensions')],
|
|
@@ -52,6 +57,7 @@ const NO_PROXY: RouteMatcher[] = [
|
|
|
52
57
|
['POST', new RegExp('^/session/[^/]+/appium/app/reset')],
|
|
53
58
|
['POST', new RegExp('^/session/[^/]+/appium/app/strings')],
|
|
54
59
|
['POST', new RegExp('^/session/[^/]+/appium/compare_images')],
|
|
60
|
+
['POST', new RegExp('^/session/[^/]+/appium/context')],
|
|
55
61
|
['POST', new RegExp('^/session/[^/]+/appium/device/activate_app')],
|
|
56
62
|
['POST', new RegExp('^/session/[^/]+/appium/device/app_installed')],
|
|
57
63
|
['POST', new RegExp('^/session/[^/]+/appium/device/app_state')],
|
|
@@ -60,10 +66,12 @@ const NO_PROXY: RouteMatcher[] = [
|
|
|
60
66
|
['POST', new RegExp('^/session/[^/]+/appium/device/install_app')],
|
|
61
67
|
['POST', new RegExp('^/session/[^/]+/appium/device/is_locked')],
|
|
62
68
|
['POST', new RegExp('^/session/[^/]+/appium/device/lock')],
|
|
69
|
+
['POST', new RegExp('^/session/[^/]+/appium/device/orientation')],
|
|
63
70
|
['POST', new RegExp('^/session/[^/]+/appium/device/pull_file')],
|
|
64
71
|
['POST', new RegExp('^/session/[^/]+/appium/device/pull_folder')],
|
|
65
72
|
['POST', new RegExp('^/session/[^/]+/appium/device/push_file')],
|
|
66
73
|
['POST', new RegExp('^/session/[^/]+/appium/device/remove_app')],
|
|
74
|
+
['POST', new RegExp('^/session/[^/]+/appium/device/rotation')],
|
|
67
75
|
['POST', new RegExp('^/session/[^/]+/appium/device/start_activity')],
|
|
68
76
|
['POST', new RegExp('^/session/[^/]+/appium/device/terminate_app')],
|
|
69
77
|
['POST', new RegExp('^/session/[^/]+/appium/device/unlock')],
|
|
@@ -471,6 +479,12 @@ Object.assign(EspressoDriver.prototype, {
|
|
|
471
479
|
updateSettings: miscCmds.updateSettings,
|
|
472
480
|
getSettings: miscCmds.getSettings,
|
|
473
481
|
|
|
482
|
+
// orientation
|
|
483
|
+
getOrientation: orientationCmds.getOrientation,
|
|
484
|
+
setOrientation: orientationCmds.setOrientation,
|
|
485
|
+
getRotation: orientationCmds.getRotation,
|
|
486
|
+
setRotation: orientationCmds.setRotation,
|
|
487
|
+
|
|
474
488
|
// screenshot
|
|
475
489
|
getScreenshot: screenshotCmds.getScreenshot,
|
|
476
490
|
mobileScreenshots: screenshotCmds.mobileScreenshots,
|
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [17.0.4](https://github.com/appium/appium-android/compare/appium-adb@17.0.3...appium-adb@17.0.4) (2026-11-17)
|
|
7
|
+
|
|
8
|
+
### Miscellaneous Chores
|
|
9
|
+
|
|
10
|
+
* **adb:** update dependency ini to v7 ([#125](https://github.com/appium/appium-android/issues/125)) ([60df469](https://github.com/appium/appium-android/commit/60df469a5bebbd1110374ebfdacbfbe5207719d1))
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
## [17.0.3](https://github.com/appium/appium-android/compare/appium-adb@17.0.2...appium-adb@17.0.3) (2026-11-14)
|
|
7
14
|
|
|
8
15
|
### Miscellaneous Chores
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-adb",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.4",
|
|
4
4
|
"description": "Android Debug Bridge interface",
|
|
5
5
|
"homepage": "https://appium.io",
|
|
6
6
|
"bugs": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@appium/support": "^8.0.0-beta.7",
|
|
48
48
|
"asyncbox": "^7.0.0",
|
|
49
|
-
"ini": "^
|
|
49
|
+
"ini": "^7.0.0",
|
|
50
50
|
"lru-cache": "^11.1.0",
|
|
51
51
|
"semver": "^7.0.0",
|
|
52
52
|
"teen_process": "^5.0.0"
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"node": "^22.22.2 || ^24.15.0 || >=26.0.0",
|
|
65
65
|
"npm": ">=10"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "d3c3bdc927cdf82b47f8ae8ff2516ed525a74b73"
|
|
68
68
|
}
|
|
@@ -3,6 +3,80 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [15.4.6](https://github.com/appium/appium-android/compare/appium-android-driver@15.4.5...appium-android-driver@15.4.6) (2026-11-21)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **driver-lib:** send a rate-limited media stream keyframe request once the limit allows ([#172](https://github.com/appium/appium-android/issues/172)) ([fd54881](https://github.com/appium/appium-android/commit/fd548812b9b555a86ddc52e71ee03d96aefcd87d))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [15.4.5](https://github.com/appium/appium-android/compare/appium-android-driver@15.4.4...appium-android-driver@15.4.5) (2026-11-19)
|
|
14
|
+
|
|
15
|
+
**Note:** Version bump only for package appium-android-driver
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## [15.4.4](https://github.com/appium/appium-android/compare/appium-android-driver@15.4.3...appium-android-driver@15.4.4) (2026-11-19)
|
|
22
|
+
|
|
23
|
+
**Note:** Version bump only for package appium-android-driver
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## [15.4.3](https://github.com/appium/appium-android/compare/appium-android-driver@15.4.2...appium-android-driver@15.4.3) (2026-11-18)
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* **driver-lib:** stop media streams only once their device session is down ([#137](https://github.com/appium/appium-android/issues/137)) ([4e50e82](https://github.com/appium/appium-android/commit/4e50e82da87d133d1421841d4d0db7146c9f7dd9))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## [15.4.2](https://github.com/appium/appium-android/compare/appium-android-driver@15.4.1...appium-android-driver@15.4.2) (2026-11-18)
|
|
37
|
+
|
|
38
|
+
### Bug Fixes
|
|
39
|
+
|
|
40
|
+
* **driver-lib:** bound batchMs and idleHeartbeatMs of the media stream ([#135](https://github.com/appium/appium-android/issues/135)) ([edc77b1](https://github.com/appium/appium-android/commit/edc77b17f7289eb12d2d3a5e155e30c66db6d27e))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## [15.4.1](https://github.com/appium/appium-android/compare/appium-android-driver@15.4.0...appium-android-driver@15.4.1) (2026-11-18)
|
|
44
|
+
|
|
45
|
+
### Bug Fixes
|
|
46
|
+
|
|
47
|
+
* **driver-lib:** match asyncbox condition-unmet errors by code ([#133](https://github.com/appium/appium-android/issues/133)) ([cb5f24f](https://github.com/appium/appium-android/commit/cb5f24fc35fb4ba4db086fd36dca7c301f4101d3))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## [15.4.0](https://github.com/appium/appium-android/compare/appium-android-driver@15.3.0...appium-android-driver@15.4.0) (2026-11-18)
|
|
51
|
+
|
|
52
|
+
### Features
|
|
53
|
+
|
|
54
|
+
* **driver-lib:** deprecate mobile: startLogsBroadcast and mobile: stopLogsBroadcast ([#129](https://github.com/appium/appium-android/issues/129)) ([bada5c4](https://github.com/appium/appium-android/commit/bada5c405eaa517db1029d03c4fa15a82d46a3ae))
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## [15.3.0](https://github.com/appium/appium-android/compare/appium-android-driver@15.2.4...appium-android-driver@15.3.0) (2026-11-18)
|
|
58
|
+
|
|
59
|
+
### Features
|
|
60
|
+
|
|
61
|
+
* **driver-lib:** derive BiDi syslog level and gate log events on subscribers ([#127](https://github.com/appium/appium-android/issues/127)) ([b4fa1f9](https://github.com/appium/appium-android/commit/b4fa1f9946292d9d82aec18cbbf8dfd84850ded7))
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## [15.2.4](https://github.com/appium/appium-android/compare/appium-android-driver@15.2.3...appium-android-driver@15.2.4) (2026-11-18)
|
|
65
|
+
|
|
66
|
+
**Note:** Version bump only for package appium-android-driver
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## [15.2.3](https://github.com/appium/appium-android/compare/appium-android-driver@15.2.2...appium-android-driver@15.2.3) (2026-11-17)
|
|
73
|
+
|
|
74
|
+
**Note:** Version bump only for package appium-android-driver
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
6
80
|
## [15.2.2](https://github.com/appium/appium-android/compare/appium-android-driver@15.2.1...appium-android-driver@15.2.2) (2026-11-15)
|
|
7
81
|
|
|
8
82
|
### Bug Fixes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AndroidDriver } from '../../driver.js';
|
|
2
|
+
/**
|
|
3
|
+
* Checks whether any BiDi client is subscribed to the event or to its whole module.
|
|
4
|
+
*
|
|
5
|
+
* @param driver - The driver instance
|
|
6
|
+
* @param method - Fully qualified event name, e.g. `log.entryAdded`
|
|
7
|
+
* @param context - If set, only subscriptions that cover this context (or all contexts) count
|
|
8
|
+
*/
|
|
9
|
+
export declare function hasSubscribers(driver: AndroidDriver, method: string, context?: string): boolean;
|
|
10
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../lib/commands/bidi/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAEnD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAM/F"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks whether any BiDi client is subscribed to the event or to its whole module.
|
|
3
|
+
*
|
|
4
|
+
* @param driver - The driver instance
|
|
5
|
+
* @param method - Fully qualified event name, e.g. `log.entryAdded`
|
|
6
|
+
* @param context - If set, only subscriptions that cover this context (or all contexts) count
|
|
7
|
+
*/
|
|
8
|
+
export function hasSubscribers(driver, method, context) {
|
|
9
|
+
const moduleName = method.split('.')[0];
|
|
10
|
+
return [method, moduleName].some((e) => {
|
|
11
|
+
const contexts = driver.bidiEventSubs[e];
|
|
12
|
+
return Boolean(contexts?.length) && (context === undefined || contexts.includes('') || contexts.includes(context));
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=helpers.js.map
|