detox 21.0.0-rc.0 → 21.0.0-rc.10
Sign up to get free protection for your applications and to get access to all the features.
- package/.eslintignore +3 -0
- package/.eslintrc.js +1 -40
- package/Detox-android/com/wix/detox/{21.0.0-rc.0/detox-21.0.0-rc.0-javadoc.jar → 21.0.0-rc.10/detox-21.0.0-rc.10-javadoc.jar} +0 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10-javadoc.jar.md5 +1 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10-javadoc.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10-javadoc.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10-javadoc.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox/{21.0.0-rc.0/detox-21.0.0-rc.0-sources.jar → 21.0.0-rc.10/detox-21.0.0-rc.10-sources.jar} +0 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10-sources.jar.md5 +1 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10-sources.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10-sources.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10-sources.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10.aar +0 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10.aar.md5 +1 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10.aar.sha1 +1 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10.aar.sha256 +1 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10.aar.sha512 +1 -0
- package/Detox-android/com/wix/detox/{21.0.0-rc.0/detox-21.0.0-rc.0.pom → 21.0.0-rc.10/detox-21.0.0-rc.10.pom} +1 -7
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10.pom.md5 +1 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10.pom.sha1 +1 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10.pom.sha256 +1 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.10/detox-21.0.0-rc.10.pom.sha512 +1 -0
- package/Detox-android/com/wix/detox/maven-metadata.xml +4 -4
- package/Detox-android/com/wix/detox/maven-metadata.xml.md5 +1 -1
- package/Detox-android/com/wix/detox/maven-metadata.xml.sha1 +1 -1
- package/Detox-android/com/wix/detox/maven-metadata.xml.sha256 +1 -1
- package/Detox-android/com/wix/detox/maven-metadata.xml.sha512 +1 -1
- package/Detox-ios-framework.tbz +0 -0
- package/Detox-ios-src.tbz +0 -0
- package/Detox-ios-xcuitest.tbz +0 -0
- package/android/build.gradle +20 -10
- package/android/detox/build.gradle +24 -12
- package/android/detox/src/full/java/com/wix/detox/espresso/DetoxAssertion.java +44 -25
- package/android/detox/src/full/java/com/wix/detox/espresso/DetoxMatcher.java +12 -12
- package/android/detox/src/full/java/com/wix/detox/espresso/EspressoDetox.java +6 -7
- package/android/detox/src/full/java/com/wix/detox/espresso/action/AdjustSliderToPositionAction.kt +2 -2
- package/android/detox/src/full/java/com/wix/detox/espresso/action/GetAttributesAction.kt +34 -35
- package/android/detox/src/full/java/com/wix/detox/espresso/common/MaterialSliderHelper.kt +21 -0
- package/android/detox/src/full/java/com/wix/detox/espresso/common/{SliderHelper.kt → ReactSliderHelper.kt} +7 -6
- package/android/detox/src/full/java/com/wix/detox/espresso/matcher/RegexMatcher.kt +56 -0
- package/android/detox/src/full/java/com/wix/detox/espresso/matcher/ViewMatchers.kt +18 -6
- package/android/detox/src/full/java/com/wix/detox/espresso/performer/MultipleViewsActionPerformer.kt +43 -0
- package/android/detox/src/full/java/com/wix/detox/espresso/performer/SingleViewActionPerformer.kt +19 -0
- package/android/detox/src/full/java/com/wix/detox/espresso/performer/ViewActionPerformer.kt +24 -0
- package/android/detox/src/full/java/com/wix/detox/espresso/web/WebElement.java +4 -4
- package/android/detox/src/full/java/com/wix/invoke/types/Invocation.java +7 -6
- package/android/detox/src/main/java/com/wix/detox/espresso/MultipleViewsAction.kt +4 -0
- package/android/detox/src/main/java/com/wix/detox/espresso/UiControllerSpy.kt +0 -1
- package/android/detox/src/main/java/com/wix/detox/espresso/ViewActionWithResult.kt +2 -1
- package/android/detox/src/main/java/com/wix/detox/espresso/action/common/MotionEvents.kt +60 -4
- package/android/detox/src/testFull/java/com/wix/detox/espresso/action/GetAttributesActionTest.kt +6 -5
- package/android/detox/src/testFull/java/com/wix/detox/espresso/common/MaterialSliderHelperTest.kt +33 -0
- package/android/detox/src/testFull/java/com/wix/detox/espresso/common/{SliderHelperTest.kt → ReactSliderHelperTest.kt} +3 -3
- package/android/detox/src/testFull/java/com/wix/detox/espresso/matcher/RegexMatcherTest.kt +52 -0
- package/android/detox/src/testFull/java/com/wix/detox/espresso/performer/ViewActionPerformerSpec.kt +37 -0
- package/android/detox/src/testFull/java/com/wix/invoke/JsonParserTest.java +23 -7
- package/android/detox/src/testFull/resources/targetInvocationEspressoWebDetoxScript.json +47 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/rninfo.gradle +25 -0
- package/android/settings.gradle +2 -1
- package/detox.d.ts +1840 -0
- package/globals.d.ts +23 -0
- package/index.d.ts +2 -1789
- package/internals.d.ts +11 -1
- package/jest.config.js +108 -0
- package/local-cli/reset-lock-file.js +5 -9
- package/local-cli/startCommand/AppStartCommand.js +4 -1
- package/local-cli/testCommand/TestRunnerCommand.js +26 -3
- package/local-cli/utils/interruptListeners.js +15 -0
- package/package.json +15 -108
- package/runners/jest/reporter.js +21 -1
- package/runners/jest/reporters/DetoxIPCReporter.js +34 -0
- package/runners/jest/reporters/DetoxReporterDispatcher.js +144 -0
- package/runners/jest/reporters/DetoxSummaryReporter.js +16 -0
- package/runners/jest/reporters/DetoxVerboseReporter.js +16 -0
- package/runners/jest/reporters/index.js +6 -0
- package/runners/jest/testEnvironment/index.js +11 -0
- package/src/DetoxWorker.js +5 -11
- package/src/android/core/NativeElement.js +26 -29
- package/src/android/core/WebElement.js +24 -6
- package/src/android/espressoapi/DetoxAssertion.js +16 -14
- package/src/android/espressoapi/DetoxMatcher.js +24 -8
- package/src/android/espressoapi/EspressoDetox.js +9 -2
- package/src/android/espressoapi/web/WebElement.js +1 -4
- package/src/android/interactions/native.js +2 -3
- package/src/android/matchers/index.js +4 -0
- package/src/android/matchers/native.js +9 -4
- package/src/android/matchers/web.js +26 -1
- package/src/artifacts/providers/index.js +3 -3
- package/src/artifacts/screenshot/SimulatorScreenshotPlugin.js +0 -17
- package/src/configuration/composeLoggerConfig.js +1 -0
- package/src/configuration/composeRunnerConfig.js +3 -1
- package/src/devices/allocation/DeviceAllocator.js +66 -20
- package/src/devices/allocation/DeviceList.js +44 -0
- package/src/devices/allocation/DeviceRegistry.js +189 -0
- package/src/devices/allocation/drivers/AllocationDriverBase.d.ts +15 -0
- package/src/devices/{common/drivers/android/tools → allocation/drivers/android}/FreeDeviceFinder.js +11 -10
- package/src/devices/allocation/drivers/android/attached/AttachedAndroidAllocDriver.js +22 -17
- package/src/devices/allocation/drivers/android/emulator/EmulatorAllocDriver.js +97 -38
- package/src/devices/allocation/drivers/android/emulator/EmulatorLauncher.js +32 -45
- package/src/devices/allocation/drivers/android/emulator/FreeEmulatorFinder.js +1 -1
- package/src/devices/allocation/drivers/android/emulator/FreePortFinder.js +37 -0
- package/src/devices/allocation/drivers/android/emulator/launchEmulatorProcess.js +3 -3
- package/src/devices/allocation/drivers/android/genycloud/GenyAllocDriver.js +104 -32
- package/src/devices/allocation/drivers/android/genycloud/GenyInstanceLauncher.js +40 -31
- package/src/devices/allocation/drivers/android/genycloud/GenyRegistry.js +121 -0
- package/src/devices/allocation/drivers/android/genycloud/services/GenyInstanceLifecycleService.js +24 -0
- package/src/devices/{common → allocation}/drivers/android/genycloud/services/GenyRecipesService.js +1 -1
- package/src/devices/allocation/drivers/android/genycloud/services/dto/GenyInstance.js +83 -0
- package/src/devices/allocation/drivers/android/genycloud/services/dto/GenyRecipe.js +25 -0
- package/src/devices/allocation/drivers/ios/SimulatorAllocDriver.js +95 -54
- package/src/devices/allocation/drivers/ios/SimulatorQuery.js +24 -0
- package/src/devices/allocation/factories/android.js +29 -35
- package/src/devices/allocation/factories/ios.js +6 -7
- package/src/devices/common/drivers/DeviceCookie.d.ts +12 -0
- package/src/devices/common/drivers/android/cookies.d.ts +11 -0
- package/src/devices/common/drivers/android/emulator/exec/EmulatorExec.js +17 -5
- package/src/devices/common/drivers/android/exec/ADB.js +1 -0
- package/src/devices/common/drivers/android/tools/instrumentationArgs.js +7 -1
- package/src/devices/common/drivers/ios/cookies.d.ts +9 -0
- package/src/devices/common/drivers/ios/tools/AppleSimUtils.js +3 -1
- package/src/devices/cookies/index.js +0 -6
- package/src/devices/runtime/drivers/android/genycloud/GenyCloudDriver.js +7 -6
- package/src/devices/runtime/drivers/ios/SimulatorDriver.js +9 -24
- package/src/devices/runtime/drivers/ios/XCUITestUtils.js +33 -19
- package/src/devices/runtime/factories/android.js +3 -11
- package/src/devices/runtime/factories/ios.js +3 -4
- package/src/{servicelocator → devices/servicelocator}/android/emulatorServiceLocator.js +1 -1
- package/src/devices/servicelocator/android/genycloudServiceLocator.js +17 -0
- package/src/devices/servicelocator/android/index.js +23 -0
- package/src/{validation → devices/validation}/EnvironmentValidatorBase.js +1 -0
- package/src/{validation → devices/validation}/android/GenycloudEnvValidator.js +2 -2
- package/src/{validation → devices/validation}/factories/index.js +1 -1
- package/src/{validation → devices/validation}/ios/IosSimulatorEnvValidator.js +2 -2
- package/src/environmentFactory.js +1 -11
- package/src/invoke.js +0 -2
- package/src/ios/expectTwo.js +28 -11
- package/src/ios/web.js +302 -0
- package/src/ipc/IPCClient.js +22 -1
- package/src/ipc/IPCServer.js +42 -1
- package/src/ipc/SessionState.js +1 -0
- package/src/logger/DetoxLogger.js +2 -2
- package/src/realms/DetoxContext.js +8 -0
- package/src/realms/DetoxInternalsFacade.js +1 -0
- package/src/realms/DetoxPrimaryContext.js +49 -44
- package/src/realms/DetoxSecondaryContext.js +27 -0
- package/src/realms/symbols.js +6 -0
- package/src/utils/PIDService.js +27 -0
- package/src/utils/assertIsFunction.js +35 -0
- package/src/utils/environment.js +8 -15
- package/src/utils/errorUtils.js +3 -3
- package/src/utils/invocationTraceDescriptions.js +16 -0
- package/src/utils/isArrowFunction.js +24 -0
- package/src/utils/isRegExp.js +7 -0
- package/tsconfig.json +8 -3
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0-javadoc.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0-javadoc.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0-javadoc.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0-javadoc.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0-sources.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0-sources.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0-sources.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0-sources.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0.aar +0 -0
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0.aar.md5 +0 -1
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0.aar.sha1 +0 -1
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0.aar.sha256 +0 -1
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0.aar.sha512 +0 -1
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0.pom.md5 +0 -1
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0.pom.sha1 +0 -1
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0.pom.sha256 +0 -1
- package/Detox-android/com/wix/detox/21.0.0-rc.0/detox-21.0.0-rc.0.pom.sha512 +0 -1
- package/runners/jest/reporters/DetoxReporter.js +0 -36
- package/src/devices/DeviceRegistry.js +0 -176
- package/src/devices/allocation/drivers/AllocationDriverBase.js +0 -30
- package/src/devices/allocation/drivers/android/attached/AttachedAndroidLauncher.js +0 -13
- package/src/devices/allocation/drivers/android/emulator/EmulatorAllocationHelper.js +0 -72
- package/src/devices/allocation/drivers/android/genycloud/GenyDeviceRegistryFactory.js +0 -16
- package/src/devices/allocation/drivers/android/genycloud/GenyInstanceAllocationHelper.js +0 -65
- package/src/devices/allocation/drivers/ios/SimulatorLauncher.js +0 -21
- package/src/devices/common/drivers/DeviceAllocationHelper.js +0 -20
- package/src/devices/common/drivers/DeviceLauncher.js +0 -19
- package/src/devices/common/drivers/android/genycloud/services/GenyInstanceLifecycleService.js +0 -25
- package/src/devices/common/drivers/android/genycloud/services/GenyInstanceLookupService.js +0 -38
- package/src/devices/common/drivers/android/genycloud/services/GenyInstanceNaming.js +0 -14
- package/src/devices/common/drivers/android/genycloud/services/dto/GenyInstance.js +0 -66
- package/src/devices/common/drivers/android/genycloud/services/dto/GenyRecipe.js +0 -13
- package/src/devices/cookies/AndroidDeviceCookie.js +0 -13
- package/src/devices/cookies/AndroidEmulatorCookie.js +0 -6
- package/src/devices/cookies/AttachedAndroidDeviceCookie.js +0 -12
- package/src/devices/cookies/DeviceCookie.js +0 -4
- package/src/devices/cookies/GenycloudEmulatorCookie.js +0 -20
- package/src/devices/cookies/IosCookie.js +0 -6
- package/src/devices/cookies/IosSimulatorCookie.js +0 -10
- package/src/devices/lifecycle/GenyGlobalLifecycleHandler.js +0 -71
- package/src/devices/lifecycle/factories/GenyGlobalLifecycleHandlerFactory.js +0 -18
- package/src/invoke/EarlGrey.js +0 -8
- package/src/servicelocator/android/genycloudServiceLocator.js +0 -21
- package/src/servicelocator/android/index.js +0 -25
- package/src/servicelocator/ios.js +0 -7
- /package/src/devices/{common → allocation}/drivers/android/genycloud/exec/GenyCloudExec.js +0 -0
- /package/src/devices/{common → allocation}/drivers/android/genycloud/services/GenyAuthService.js +0 -0
@@ -0,0 +1,11 @@
|
|
1
|
+
/* eslint-disable import/no-unresolved,node/no-missing-import,node/no-unsupported-features/es-syntax */
|
2
|
+
import GenyInstance from '../../../allocation/drivers/android/genycloud/services/dto/GenyInstance';
|
3
|
+
import { DeviceCookie } from '../DeviceCookie';
|
4
|
+
|
5
|
+
interface AndroidDeviceCookie extends DeviceCookie {
|
6
|
+
adbName: string;
|
7
|
+
}
|
8
|
+
|
9
|
+
interface GenycloudEmulatorCookie extends AndroidDeviceCookie {
|
10
|
+
instance: GenyInstance;
|
11
|
+
}
|
@@ -32,19 +32,31 @@ class QueryVersionCommand extends ExecCommand {
|
|
32
32
|
}
|
33
33
|
|
34
34
|
class LaunchCommand extends ExecCommand {
|
35
|
-
constructor(
|
35
|
+
constructor(options) {
|
36
36
|
super();
|
37
37
|
this._options = options;
|
38
|
-
this._args = this._getEmulatorArgs(
|
39
|
-
|
38
|
+
this._args = this._getEmulatorArgs();
|
39
|
+
}
|
40
|
+
|
41
|
+
get adbName() {
|
42
|
+
return this._options.adbName;
|
43
|
+
}
|
44
|
+
|
45
|
+
get avdName() {
|
46
|
+
return this._options.avdName;
|
47
|
+
}
|
48
|
+
|
49
|
+
get port() {
|
50
|
+
return this._options.port;
|
40
51
|
}
|
41
52
|
|
42
53
|
_getArgs() {
|
43
54
|
return this._args;
|
44
55
|
}
|
45
56
|
|
46
|
-
_getEmulatorArgs(
|
57
|
+
_getEmulatorArgs() {
|
47
58
|
const {
|
59
|
+
avdName,
|
48
60
|
bootArgs,
|
49
61
|
gpuMode = this._getDefaultGPUMode(),
|
50
62
|
headless,
|
@@ -64,7 +76,7 @@ class LaunchCommand extends ExecCommand {
|
|
64
76
|
port ? '-port' : '',
|
65
77
|
port ? `${port}` : '',
|
66
78
|
...deviceBootArgs,
|
67
|
-
`@${
|
79
|
+
`@${avdName}`
|
68
80
|
]);
|
69
81
|
|
70
82
|
return emulatorArgs;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
const _ = require('lodash');
|
2
2
|
|
3
3
|
const { encodeBase64 } = require('../../../../../utils/encoding');
|
4
|
+
const { autoEscape } = require('../../../../../utils/shellUtils');
|
4
5
|
|
5
6
|
const reservedInstrumentationArgs = new Set(['class', 'package', 'func', 'unit', 'size', 'perf', 'debug', 'log', 'emma', 'coverageFile']);
|
6
7
|
const isReservedInstrumentationArg = (arg) => reservedInstrumentationArgs.has(arg);
|
@@ -17,7 +18,8 @@ function prepareInstrumentationArgs(args) {
|
|
17
18
|
valueEncoded = encodeBase64(valueAsString);
|
18
19
|
}
|
19
20
|
|
20
|
-
|
21
|
+
const valueEscaped = hasLegacyIssues(key) ? valueEncoded : autoEscape.shell(valueEncoded);
|
22
|
+
result.push('-e', key, valueEscaped);
|
21
23
|
return result;
|
22
24
|
}, []);
|
23
25
|
|
@@ -27,6 +29,10 @@ function prepareInstrumentationArgs(args) {
|
|
27
29
|
};
|
28
30
|
}
|
29
31
|
|
32
|
+
function hasLegacyIssues(key) {
|
33
|
+
return key === 'detoxURLBlacklistRegex';
|
34
|
+
}
|
35
|
+
|
30
36
|
module.exports = {
|
31
37
|
prepareInstrumentationArgs,
|
32
38
|
};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/* eslint-disable import/no-unresolved,node/no-missing-import,node/no-unsupported-features/es-syntax */
|
2
|
+
import { DeviceCookie } from '../DeviceCookie';
|
3
|
+
|
4
|
+
interface IosSimulatorCookie extends DeviceCookie {
|
5
|
+
udid: string;
|
6
|
+
type?: string;
|
7
|
+
bootArgs?: string;
|
8
|
+
headless?: boolean;
|
9
|
+
}
|
@@ -288,7 +288,7 @@ class AppleSimUtils {
|
|
288
288
|
// want to make sure it isn't now.
|
289
289
|
if (err.code === 3 &&
|
290
290
|
(err.stderr.includes(`the app is not currently running`) ||
|
291
|
-
err.stderr.includes(`
|
291
|
+
err.stderr.includes(`found nothing to terminate`))) {
|
292
292
|
return;
|
293
293
|
}
|
294
294
|
|
@@ -446,6 +446,8 @@ class AppleSimUtils {
|
|
446
446
|
overrides.push(`--cellularMode "${flags.cellularMode}"`);
|
447
447
|
if (flags.cellularBars)
|
448
448
|
overrides.push(`--cellularBars "${flags.cellularBars}"`);
|
449
|
+
if (flags.operatorName)
|
450
|
+
overrides.push(`--operatorName "${flags.operatorName}"`);
|
449
451
|
if (flags.batteryState)
|
450
452
|
overrides.push(`--batteryState "${flags.batteryState}"`);
|
451
453
|
if (flags.batteryLevel)
|
@@ -1,6 +0,0 @@
|
|
1
|
-
module.exports = {
|
2
|
-
IosSimulatorCookie: require('./IosSimulatorCookie'),
|
3
|
-
AttachedAndroidDeviceCookie: require('./AttachedAndroidDeviceCookie'),
|
4
|
-
AndroidEmulatorCookie: require('./AndroidEmulatorCookie'),
|
5
|
-
GenycloudEmulatorCookie: require('./GenycloudEmulatorCookie'),
|
6
|
-
};
|
@@ -8,21 +8,22 @@ const AndroidDriver = require('../AndroidDriver');
|
|
8
8
|
|
9
9
|
/**
|
10
10
|
* @typedef GenycloudDriverProps
|
11
|
-
* @property
|
11
|
+
* @property adbName { GenyInstance } The DTO associated with the cloud instance
|
12
12
|
*/
|
13
13
|
|
14
14
|
class GenyCloudDriver extends AndroidDriver {
|
15
15
|
/**
|
16
16
|
* @param deps { GenycloudDriverDeps }
|
17
|
-
* @param props {
|
17
|
+
* @param props { GenycloudEmulatorCookie }
|
18
18
|
*/
|
19
|
-
constructor(deps, {
|
20
|
-
super(deps, { adbName
|
21
|
-
|
19
|
+
constructor(deps, { adbName, name }) {
|
20
|
+
super(deps, { adbName });
|
21
|
+
|
22
|
+
this._instanceName = name;
|
22
23
|
}
|
23
24
|
|
24
25
|
getDeviceName() {
|
25
|
-
return this.
|
26
|
+
return this._instanceName;
|
26
27
|
}
|
27
28
|
|
28
29
|
async setLocation(lat, lon) {
|
@@ -17,7 +17,6 @@ const { launchXCUITest } = require('./XCUITestUtils');
|
|
17
17
|
|
18
18
|
/**
|
19
19
|
* @typedef SimulatorDriverDeps { DeviceDriverDeps }
|
20
|
-
* @property simulatorLauncher { SimulatorLauncher }
|
21
20
|
* @property applesimutils { AppleSimUtils }
|
22
21
|
*/
|
23
22
|
|
@@ -28,19 +27,6 @@ const { launchXCUITest } = require('./XCUITestUtils');
|
|
28
27
|
* @property bootArgs { Object }
|
29
28
|
*/
|
30
29
|
|
31
|
-
let SingletonPortToUsageMap = (function () {
|
32
|
-
let instance;
|
33
|
-
|
34
|
-
return {
|
35
|
-
getInstance: function () {
|
36
|
-
if (!instance) {
|
37
|
-
instance = {};
|
38
|
-
}
|
39
|
-
return instance;
|
40
|
-
}
|
41
|
-
};
|
42
|
-
})();
|
43
|
-
|
44
30
|
class SimulatorDriver extends IosDriver {
|
45
31
|
/**
|
46
32
|
* @param deps { SimulatorDriverDeps }
|
@@ -54,8 +40,9 @@ class SimulatorDriver extends IosDriver {
|
|
54
40
|
this._bootArgs = bootArgs;
|
55
41
|
this._headless = headless;
|
56
42
|
this._deviceName = `${udid} (${this._type})`;
|
57
|
-
this._simulatorLauncher = deps.simulatorLauncher;
|
58
43
|
this._applesimutils = deps.applesimutils;
|
44
|
+
// TODO: allocate unique-per-worker available port.
|
45
|
+
this._testTargetServerPort = 8997 + _.random(0, 1000);
|
59
46
|
}
|
60
47
|
|
61
48
|
getExternalId() {
|
@@ -108,7 +95,7 @@ class SimulatorDriver extends IosDriver {
|
|
108
95
|
bundleId,
|
109
96
|
launchArgs.detoxDebugVisibility,
|
110
97
|
launchArgs.detoxDisableHierarchyDump,
|
111
|
-
|
98
|
+
this._testTargetServerPort
|
112
99
|
);
|
113
100
|
}
|
114
101
|
|
@@ -119,14 +106,9 @@ class SimulatorDriver extends IosDriver {
|
|
119
106
|
}
|
120
107
|
|
121
108
|
enrichArgs(args) {
|
122
|
-
const detoxServerPort = _.findLast(args.detoxServer.split(':'));
|
123
|
-
const portToUsagesCountMap = SingletonPortToUsageMap.getInstance();
|
124
|
-
const portUsagesCount = portToUsagesCountMap[detoxServerPort] = (portToUsagesCountMap[detoxServerPort] || 0) + 1;
|
125
|
-
const testTargetPort = Number(detoxServerPort) + 1000 * portUsagesCount;
|
126
|
-
|
127
109
|
return {
|
128
110
|
...args,
|
129
|
-
detoxTestTargetServer:
|
111
|
+
detoxTestTargetServer: 'ws://localhost:' + this._testTargetServerPort,
|
130
112
|
};
|
131
113
|
}
|
132
114
|
|
@@ -206,9 +188,12 @@ class SimulatorDriver extends IosDriver {
|
|
206
188
|
}
|
207
189
|
|
208
190
|
async resetContentAndSettings() {
|
209
|
-
await this.
|
191
|
+
await this.emitter.emit('beforeShutdownDevice', { deviceId: this.udid });
|
192
|
+
await this._applesimutils.shutdown(this.udid);
|
193
|
+
await this.emitter.emit('shutdownDevice', { deviceId: this.udid });
|
210
194
|
await this._applesimutils.resetContentAndSettings(this.udid);
|
211
|
-
await this.
|
195
|
+
await this._applesimutils.boot(this.udid, this._bootArgs, this._headless);
|
196
|
+
await this.emitter.emit('bootDevice', { deviceId: this.udid });
|
212
197
|
}
|
213
198
|
|
214
199
|
getLogsPaths() {
|
@@ -1,7 +1,6 @@
|
|
1
1
|
const { exec } = require('child-process-promise');
|
2
2
|
const osascript = require('node-osascript');
|
3
3
|
|
4
|
-
const { execWithRetriesAndLogs } = require('../../../../utils/childProcess');
|
5
4
|
const log = require('../../../../utils/logger').child({ cat: 'device,xcuitest' });
|
6
5
|
|
7
6
|
async function launchXCUITest(
|
@@ -56,7 +55,7 @@ async function _runLaunchCommand(
|
|
56
55
|
).then(r => {
|
57
56
|
log.info(`[XCUITest] XCUITest runner execution finished`);
|
58
57
|
}).catch(e => {
|
59
|
-
log.
|
58
|
+
log.debug(`[XCUITest] XCUITest runner execution finished with message:\n${e}`);
|
60
59
|
});
|
61
60
|
|
62
61
|
// Get firewall global state (Firewall socketfilterfw):
|
@@ -67,7 +66,12 @@ async function _runLaunchCommand(
|
|
67
66
|
}
|
68
67
|
|
69
68
|
const isServerUp = await _waitForTestTargetServerToStart(testTargetServerPort, spawnedProcess);
|
70
|
-
|
69
|
+
if (!isServerUp) {
|
70
|
+
throw new Error(`[XCUITest] Test runner is not up after 90 seconds, aborting`);
|
71
|
+
} else {
|
72
|
+
const childProcess = spawnedProcess.childProcess;
|
73
|
+
log.debug(`[XCUITest] Test runner is up and running, PID: ${childProcess.pid}`);
|
74
|
+
}
|
71
75
|
}
|
72
76
|
|
73
77
|
function runXCUITest(
|
@@ -101,28 +105,38 @@ function runXCUITest(
|
|
101
105
|
};
|
102
106
|
|
103
107
|
const options = {
|
104
|
-
maxBuffer: 1024 * 1024 *
|
105
|
-
retries: 1,
|
106
|
-
verbosity: 'high',
|
108
|
+
maxBuffer: 1024 * 1024 * 10, // 10MB
|
107
109
|
};
|
108
110
|
|
109
111
|
const command = `${env.TEST_RUNNER_IS_DETOX_ACTIVE ? Object.keys(env).map(key => `${key}=${env[key]}`).join(' ') : ''} ${xcodebuildBinary} ${flags.map(flag => flag.includes(' ') ? `"${flag}"` : flag).join(' ')}`;
|
110
112
|
log.debug(`[XCUITest] Running command: ${command}`);
|
111
113
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
114
|
+
const isRunningOnTerminal = process.stdout.isTTY;
|
115
|
+
if (isRunningOnTerminal !== true) {
|
116
|
+
log.debug(`[XCUITest] Currently not running through the Terminal, trying to execute the command from the Terminal`);
|
117
|
+
|
118
|
+
try {
|
119
|
+
return _runCommandInTerminal(command, options);
|
120
|
+
} catch (e) {
|
121
|
+
log.warn(`[XCUITest] Failed to execute the command from the Terminal, falling back to the default execution`);
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
const result = exec(command, options);
|
126
|
+
|
127
|
+
result.childProcess.stderr.on('data', (data) => {
|
128
|
+
if (data.includes('Testing started completed')) {
|
129
|
+
result.childProcess.kill('SIGTERM');
|
130
|
+
}
|
131
|
+
});
|
132
|
+
|
133
|
+
return result;
|
120
134
|
}
|
121
135
|
|
122
136
|
function _runCommandInTerminal(command, options) {
|
123
|
-
const escapedCommand = command.replace(/"/g, '\\"');
|
137
|
+
const escapedCommand = command.replace(/"/g, '\\"');
|
124
138
|
|
125
|
-
//
|
139
|
+
// Opens the Terminal app and runs the command in a new window, then closes the window when the command is done running.
|
126
140
|
const appleScript = `
|
127
141
|
tell application "Terminal"
|
128
142
|
if not running then
|
@@ -142,7 +156,7 @@ function _runCommandInTerminal(command, options) {
|
|
142
156
|
end tell
|
143
157
|
`;
|
144
158
|
|
145
|
-
return
|
159
|
+
return exec(`osascript -e '${appleScript}'`, options);
|
146
160
|
}
|
147
161
|
|
148
162
|
function _allowNetworkPermissionsXCUITest() {
|
@@ -170,7 +184,7 @@ function _allowNetworkPermissionsXCUITest() {
|
|
170
184
|
childProcess.stdin.pause();
|
171
185
|
childProcess.kill('SIGTERM');
|
172
186
|
|
173
|
-
}, 30000);
|
187
|
+
}, 30000).unref();
|
174
188
|
}
|
175
189
|
|
176
190
|
async function _waitForTestTargetServerToStart(testTargetServerPort, cpPromise) {
|
@@ -191,7 +205,7 @@ async function _waitForTestTargetServerToStart(testTargetServerPort, cpPromise)
|
|
191
205
|
if (!isServerUp) {
|
192
206
|
log.error(`[XCUITest] Test target server is not up after 90 seconds, aborting`);
|
193
207
|
|
194
|
-
if (cpPromise.childProcess.kill('SIGTERM')) {
|
208
|
+
if (cpPromise && cpPromise.childProcess && cpPromise.childProcess.kill('SIGTERM')) {
|
195
209
|
log.debug(`[XCUITest] Test target process was killed`);
|
196
210
|
} else {
|
197
211
|
log.debug(`[XCUITest] Test target process was not killed`);
|
@@ -3,7 +3,7 @@ const RuntimeDeviceFactory = require('./base');
|
|
3
3
|
|
4
4
|
class RuntimeDriverFactoryAndroid extends RuntimeDeviceFactory {
|
5
5
|
_createDriverDependencies(commonDeps) {
|
6
|
-
const serviceLocator = require('
|
6
|
+
const serviceLocator = require('../../servicelocator/android');
|
7
7
|
const adb = serviceLocator.adb;
|
8
8
|
const aapt = serviceLocator.aapt;
|
9
9
|
const apkValidator = serviceLocator.apkValidator;
|
@@ -43,23 +43,15 @@ class AndroidEmulator extends RuntimeDriverFactoryAndroid {
|
|
43
43
|
|
44
44
|
class AndroidAttached extends RuntimeDriverFactoryAndroid {
|
45
45
|
_createDriver(deviceCookie, deps, configs) {
|
46
|
-
const props = {
|
47
|
-
adbName: deviceCookie.adbName,
|
48
|
-
};
|
49
|
-
|
50
46
|
const { AttachedAndroidRuntimeDriver } = require('../drivers');
|
51
|
-
return new AttachedAndroidRuntimeDriver(deps,
|
47
|
+
return new AttachedAndroidRuntimeDriver(deps, deviceCookie);
|
52
48
|
}
|
53
49
|
}
|
54
50
|
|
55
51
|
class Genycloud extends RuntimeDriverFactoryAndroid {
|
56
52
|
_createDriver(deviceCookie, deps, configs) {
|
57
|
-
const props = {
|
58
|
-
instance: deviceCookie.instance,
|
59
|
-
};
|
60
|
-
|
61
53
|
const { GenycloudRuntimeDriver } = require('../drivers');
|
62
|
-
return new GenycloudRuntimeDriver(deps,
|
54
|
+
return new GenycloudRuntimeDriver(deps, deviceCookie);
|
63
55
|
}
|
64
56
|
}
|
65
57
|
|
@@ -2,15 +2,14 @@ const RuntimeDeviceFactory = require('./base');
|
|
2
2
|
|
3
3
|
class RuntimeDriverFactoryIos extends RuntimeDeviceFactory {
|
4
4
|
_createDriverDependencies(commonDeps) {
|
5
|
-
const serviceLocator = require('../../../servicelocator/ios');
|
6
|
-
const applesimutils = serviceLocator.appleSimUtils;
|
7
5
|
const { eventEmitter } = commonDeps;
|
8
6
|
|
9
|
-
const
|
7
|
+
const AppleSimUtils = require('../../../devices/common/drivers/ios/tools/AppleSimUtils');
|
8
|
+
const applesimutils = new AppleSimUtils();
|
9
|
+
|
10
10
|
return {
|
11
11
|
...commonDeps,
|
12
12
|
applesimutils,
|
13
|
-
simulatorLauncher: new SimulatorLauncher({ applesimutils, eventEmitter }),
|
14
13
|
};
|
15
14
|
}
|
16
15
|
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class GenycloudServiceLocator {
|
2
|
+
constructor() {
|
3
|
+
this._exec = null;
|
4
|
+
}
|
5
|
+
|
6
|
+
// Note: important to keep lazy because of implicit validations that are sensitive (inside environment, in particular).
|
7
|
+
get exec() {
|
8
|
+
if (!this._exec) {
|
9
|
+
const Exec = require('../../allocation/drivers/android/genycloud/exec/GenyCloudExec');
|
10
|
+
const environment = require('../../../utils/environment');
|
11
|
+
this._exec = new Exec(environment.getGmsaasPath());
|
12
|
+
}
|
13
|
+
return this._exec;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
module.exports = new GenycloudServiceLocator();
|
@@ -0,0 +1,23 @@
|
|
1
|
+
const AndroidDevicePathBuilder = require('../../../artifacts/utils/AndroidDevicePathBuilder');
|
2
|
+
const AAPT = require('../../common/drivers/android/exec/AAPT');
|
3
|
+
const ADB = require('../../common/drivers/android/exec/ADB');
|
4
|
+
const ApkValidator = require('../../common/drivers/android/tools/ApkValidator');
|
5
|
+
const { TempFileTransfer } = require('../../common/drivers/android/tools/TempFileTransfer');
|
6
|
+
|
7
|
+
const AndroidServiceLocator = {
|
8
|
+
get emulator() {
|
9
|
+
return require('./emulatorServiceLocator');
|
10
|
+
},
|
11
|
+
|
12
|
+
get genycloud() {
|
13
|
+
return require('./genycloudServiceLocator');
|
14
|
+
},
|
15
|
+
};
|
16
|
+
|
17
|
+
AndroidServiceLocator.adb = new ADB();
|
18
|
+
AndroidServiceLocator.aapt = new AAPT();
|
19
|
+
AndroidServiceLocator.apkValidator = new ApkValidator(AndroidServiceLocator.aapt);
|
20
|
+
AndroidServiceLocator.fileTransfer = new TempFileTransfer(AndroidServiceLocator.adb);
|
21
|
+
AndroidServiceLocator.devicePathBuilder = new AndroidDevicePathBuilder();
|
22
|
+
|
23
|
+
module.exports = AndroidServiceLocator;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
// @ts-nocheck
|
2
2
|
const semver = require('semver');
|
3
3
|
|
4
|
-
const DetoxRuntimeError = require('
|
5
|
-
const environment = require('
|
4
|
+
const { DetoxRuntimeError } = require('../../../errors');
|
5
|
+
const environment = require('../../../utils/environment');
|
6
6
|
const EnvironmentValidatorBase = require('../EnvironmentValidatorBase');
|
7
7
|
|
8
8
|
const MIN_GMSAAS_VERSION = '1.6.0';
|
@@ -7,7 +7,7 @@ class Genycloud extends EnvValidatorFactory {
|
|
7
7
|
const serviceLocator = require('../../servicelocator/android');
|
8
8
|
const exec = serviceLocator.genycloud.exec;
|
9
9
|
|
10
|
-
const GenyAuthService = require('../../
|
10
|
+
const GenyAuthService = require('../../allocation/drivers/android/genycloud/services/GenyAuthService');
|
11
11
|
const authService = new GenyAuthService(exec);
|
12
12
|
|
13
13
|
const GenycloudEnvValidator = require('../android/GenycloudEnvValidator');
|
@@ -1,7 +1,7 @@
|
|
1
1
|
const fs = require('fs');
|
2
2
|
|
3
|
-
const DetoxRuntimeError = require('
|
4
|
-
const environment = require('
|
3
|
+
const DetoxRuntimeError = require('../../../errors/DetoxRuntimeError');
|
4
|
+
const environment = require('../../../utils/environment');
|
5
5
|
const EnvironmentValidatorBase = require('../EnvironmentValidatorBase');
|
6
6
|
|
7
7
|
class IosSimulatorEnvValidator extends EnvironmentValidatorBase {
|
@@ -2,9 +2,9 @@
|
|
2
2
|
const artifactsManagerFactories = require('./artifacts/factories');
|
3
3
|
const deviceAllocationFactories = require('./devices/allocation/factories');
|
4
4
|
const runtimeDeviceFactories = require('./devices/runtime/factories');
|
5
|
+
const envValidationFactories = require('./devices/validation/factories');
|
5
6
|
const matchersFactories = require('./matchers/factories');
|
6
7
|
const resolveModuleFromPath = require('./utils/resolveModuleFromPath');
|
7
|
-
const envValidationFactories = require('./validation/factories');
|
8
8
|
|
9
9
|
function validateConfig(deviceConfig) {
|
10
10
|
const classes = _getFactoryClasses(deviceConfig);
|
@@ -36,15 +36,6 @@ function createFactories(deviceConfig) {
|
|
36
36
|
return _getExternalModuleFactories(deviceConfig);
|
37
37
|
}
|
38
38
|
|
39
|
-
function createGlobalLifecycleHandler(deviceConfig) {
|
40
|
-
if (deviceConfig.type === 'android.genycloud') {
|
41
|
-
const FactoryClass = require('./devices/lifecycle/factories/GenyGlobalLifecycleHandlerFactory');
|
42
|
-
const factory = new FactoryClass();
|
43
|
-
return factory.createHandler();
|
44
|
-
}
|
45
|
-
return null;
|
46
|
-
}
|
47
|
-
|
48
39
|
function _getFactoryClasses(deviceConfig) {
|
49
40
|
let envValidatorFactoryClass;
|
50
41
|
let artifactsManagerFactoryClass;
|
@@ -115,5 +106,4 @@ function _getExternalModuleFactories(deviceConfig) {
|
|
115
106
|
module.exports = {
|
116
107
|
validateConfig,
|
117
108
|
createFactories,
|
118
|
-
createGlobalLifecycleHandler,
|
119
109
|
};
|
package/src/invoke.js
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
const EarlGrey = require('./invoke/EarlGrey');
|
2
1
|
const Espresso = require('./invoke/Espresso');
|
3
2
|
const EspressoWeb = require('./invoke/EspressoWeb');
|
4
3
|
const Invoke = require('./invoke/Invoke');
|
@@ -15,7 +14,6 @@ class InvocationManager {
|
|
15
14
|
|
16
15
|
module.exports = {
|
17
16
|
InvocationManager,
|
18
|
-
EarlGrey,
|
19
17
|
Espresso: Espresso.target,
|
20
18
|
EspressoWeb: EspressoWeb.target,
|
21
19
|
IOS: Invoke.genericInvokeObject,
|
package/src/ios/expectTwo.js
CHANGED
@@ -6,12 +6,16 @@ const fs = require('fs-extra');
|
|
6
6
|
const _ = require('lodash');
|
7
7
|
const tempfile = require('tempfile');
|
8
8
|
|
9
|
+
|
9
10
|
const { assertEnum, assertNormalized } = require('../utils/assertArgument');
|
10
11
|
const { removeMilliseconds } = require('../utils/dateUtils');
|
11
12
|
const { actionDescription, expectDescription } = require('../utils/invocationTraceDescriptions');
|
13
|
+
const { isRegExp } = require('../utils/isRegExp');
|
12
14
|
const log = require('../utils/logger').child({ cat: 'ws-client, ws' });
|
13
15
|
const traceInvocationCall = require('../utils/traceInvocationCall').bind(null, log);
|
14
16
|
|
17
|
+
const { webElement, webMatcher, webExpect, isWebElement } = require('./web');
|
18
|
+
|
15
19
|
const assertDirection = assertEnum(['left', 'right', 'up', 'down']);
|
16
20
|
const assertSpeed = assertEnum(['fast', 'slow']);
|
17
21
|
|
@@ -231,7 +235,7 @@ class Element {
|
|
231
235
|
|
232
236
|
performAccessibilityAction(actionName) {
|
233
237
|
if (typeof actionName !== 'string') throw new Error('actionName should be a string, but got ' + (actionName + (' (' + (typeof actionName + ')'))));
|
234
|
-
|
238
|
+
|
235
239
|
const traceDescription = actionDescription.performAccessibilityAction(actionName);
|
236
240
|
return this.withAction('accessibilityAction', traceDescription, actionName);
|
237
241
|
}
|
@@ -399,7 +403,7 @@ class By {
|
|
399
403
|
}
|
400
404
|
|
401
405
|
get web() {
|
402
|
-
|
406
|
+
return webMatcher();
|
403
407
|
}
|
404
408
|
}
|
405
409
|
|
@@ -409,14 +413,14 @@ class Matcher {
|
|
409
413
|
}
|
410
414
|
|
411
415
|
label(label) {
|
412
|
-
if (typeof label !== 'string') throw new Error('label should be a string, but got ' + (label + (' (' + (typeof label + ')'))));
|
413
|
-
this.predicate = { type: 'label', value: label };
|
416
|
+
if (typeof label !== 'string' && !isRegExp(label)) throw new Error('label should be a string or regex, but got ' + (label + (' (' + (typeof label + ')'))));
|
417
|
+
this.predicate = { type: 'label', value: label.toString(), isRegex: isRegExp(label) };
|
414
418
|
return this;
|
415
419
|
}
|
416
420
|
|
417
421
|
id(id) {
|
418
|
-
if (typeof id !== 'string') throw new Error('id should be a string, but got ' + (id + (' (' + (typeof id + ')'))));
|
419
|
-
this.predicate = { type: 'id', value: id };
|
422
|
+
if (typeof id !== 'string' && !isRegExp(id)) throw new Error('id should be a string or regex, but got ' + (id + (' (' + (typeof id + ')'))));
|
423
|
+
this.predicate = { type: 'id', value: id.toString(), isRegex: isRegExp(id) };
|
420
424
|
return this;
|
421
425
|
}
|
422
426
|
|
@@ -439,8 +443,8 @@ class Matcher {
|
|
439
443
|
}
|
440
444
|
|
441
445
|
text(text) {
|
442
|
-
if (typeof text !== 'string') throw new Error(
|
443
|
-
this.predicate = { type: 'text', value: text };
|
446
|
+
if (typeof text !== 'string' && !isRegExp(text)) throw new Error(`text should be a string or regex, but got ` + (text + (' (' + (typeof text + ')'))));
|
447
|
+
this.predicate = { type: 'text', value: text.toString(), isRegex: isRegExp(text) };
|
444
448
|
return this;
|
445
449
|
}
|
446
450
|
|
@@ -754,7 +758,7 @@ class IosExpect {
|
|
754
758
|
this.waitFor = this.waitFor.bind(this);
|
755
759
|
this.by = new By();
|
756
760
|
this.web = this.web.bind(this);
|
757
|
-
this.web.element = this.web;
|
761
|
+
this.web.element = this.web().element;
|
758
762
|
}
|
759
763
|
|
760
764
|
element(matcher) {
|
@@ -762,6 +766,10 @@ class IosExpect {
|
|
762
766
|
}
|
763
767
|
|
764
768
|
expect(element) {
|
769
|
+
if (isWebElement(element)) {
|
770
|
+
return webExpect(this._invocationManager, element);
|
771
|
+
}
|
772
|
+
|
765
773
|
return expect(this._invocationManager, element);
|
766
774
|
}
|
767
775
|
|
@@ -769,8 +777,17 @@ class IosExpect {
|
|
769
777
|
return waitFor(this._invocationManager, this._emitter, element);
|
770
778
|
}
|
771
779
|
|
772
|
-
web(
|
773
|
-
|
780
|
+
web(matcher) {
|
781
|
+
return {
|
782
|
+
element: webMatcher => {
|
783
|
+
if (!(matcher instanceof Matcher) && matcher !== undefined) {
|
784
|
+
throwMatcherError(matcher);
|
785
|
+
}
|
786
|
+
|
787
|
+
const webViewElement = matcher ? element(this._invocationManager, this._emitter, matcher) : undefined;
|
788
|
+
return webElement(this._invocationManager, this._emitter, webViewElement, webMatcher);
|
789
|
+
}
|
790
|
+
};
|
774
791
|
}
|
775
792
|
}
|
776
793
|
|