-
-
Notifications
You must be signed in to change notification settings - Fork 761
/
EspressoOptions.java
213 lines (206 loc) · 12.9 KB
/
EspressoOptions.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.appium.java_client.android.options;
import io.appium.java_client.android.options.adb.SupportsAdbExecTimeoutOption;
import io.appium.java_client.android.options.adb.SupportsAdbPortOption;
import io.appium.java_client.android.options.adb.SupportsAllowDelayAdbOption;
import io.appium.java_client.android.options.adb.SupportsBuildToolsVersionOption;
import io.appium.java_client.android.options.adb.SupportsClearDeviceLogsOnStartOption;
import io.appium.java_client.android.options.adb.SupportsIgnoreHiddenApiPolicyErrorOption;
import io.appium.java_client.android.options.adb.SupportsLogcatFilterSpecsOption;
import io.appium.java_client.android.options.adb.SupportsLogcatFormatOption;
import io.appium.java_client.android.options.adb.SupportsMockLocationAppOption;
import io.appium.java_client.android.options.adb.SupportsRemoteAdbHostOption;
import io.appium.java_client.android.options.adb.SupportsSkipLogcatCaptureOption;
import io.appium.java_client.android.options.adb.SupportsSuppressKillServerOption;
import io.appium.java_client.android.options.app.SupportsActivityOptionsOption;
import io.appium.java_client.android.options.app.SupportsAllowTestPackagesOption;
import io.appium.java_client.android.options.app.SupportsAndroidInstallTimeoutOption;
import io.appium.java_client.android.options.app.SupportsAppActivityOption;
import io.appium.java_client.android.options.app.SupportsAppPackageOption;
import io.appium.java_client.android.options.app.SupportsAppWaitActivityOption;
import io.appium.java_client.android.options.app.SupportsAppWaitDurationOption;
import io.appium.java_client.android.options.app.SupportsAppWaitPackageOption;
import io.appium.java_client.android.options.app.SupportsAutoGrantPermissionsOption;
import io.appium.java_client.android.options.app.SupportsIntentOptionsOption;
import io.appium.java_client.android.options.app.SupportsRemoteAppsCacheLimitOption;
import io.appium.java_client.android.options.app.SupportsUninstallOtherPackagesOption;
import io.appium.java_client.android.options.avd.SupportsAvdArgsOption;
import io.appium.java_client.android.options.avd.SupportsAvdEnvOption;
import io.appium.java_client.android.options.avd.SupportsAvdLaunchTimeoutOption;
import io.appium.java_client.android.options.avd.SupportsAvdOption;
import io.appium.java_client.android.options.avd.SupportsAvdReadyTimeoutOption;
import io.appium.java_client.android.options.avd.SupportsGpsEnabledOption;
import io.appium.java_client.android.options.avd.SupportsNetworkSpeedOption;
import io.appium.java_client.android.options.context.SupportsAutoWebviewTimeoutOption;
import io.appium.java_client.android.options.context.SupportsChromeLoggingPrefsOption;
import io.appium.java_client.android.options.context.SupportsChromeOptionsOption;
import io.appium.java_client.android.options.context.SupportsChromedriverArgsOption;
import io.appium.java_client.android.options.context.SupportsChromedriverChromeMappingFileOption;
import io.appium.java_client.android.options.context.SupportsChromedriverDisableBuildCheckOption;
import io.appium.java_client.android.options.context.SupportsChromedriverExecutableDirOption;
import io.appium.java_client.android.options.context.SupportsChromedriverExecutableOption;
import io.appium.java_client.android.options.context.SupportsChromedriverPortOption;
import io.appium.java_client.android.options.context.SupportsChromedriverPortsOption;
import io.appium.java_client.android.options.context.SupportsChromedriverUseSystemExecutableOption;
import io.appium.java_client.android.options.context.SupportsEnsureWebviewsHavePagesOption;
import io.appium.java_client.android.options.context.SupportsExtractChromeAndroidPackageFromContextNameOption;
import io.appium.java_client.android.options.context.SupportsNativeWebScreenshotOption;
import io.appium.java_client.android.options.context.SupportsRecreateChromeDriverSessionsOption;
import io.appium.java_client.android.options.context.SupportsShowChromedriverLogOption;
import io.appium.java_client.android.options.context.SupportsWebviewDevtoolsPortOption;
import io.appium.java_client.android.options.localization.SupportsAppLocaleOption;
import io.appium.java_client.android.options.localization.SupportsLocaleScriptOption;
import io.appium.java_client.android.options.locking.SupportsSkipUnlockOption;
import io.appium.java_client.android.options.locking.SupportsUnlockKeyOption;
import io.appium.java_client.android.options.locking.SupportsUnlockStrategyOption;
import io.appium.java_client.android.options.locking.SupportsUnlockSuccessTimeoutOption;
import io.appium.java_client.android.options.locking.SupportsUnlockTypeOption;
import io.appium.java_client.android.options.mjpeg.SupportsMjpegScreenshotUrlOption;
import io.appium.java_client.android.options.mjpeg.SupportsMjpegServerPortOption;
import io.appium.java_client.android.options.other.SupportsDisableSuppressAccessibilityServiceOption;
import io.appium.java_client.android.options.server.SupportsEspressoBuildConfigOption;
import io.appium.java_client.android.options.server.SupportsEspressoServerLaunchTimeoutOption;
import io.appium.java_client.android.options.server.SupportsForceEspressoRebuildOption;
import io.appium.java_client.android.options.server.SupportsShowGradleLogOption;
import io.appium.java_client.android.options.server.SupportsSkipServerInstallationOption;
import io.appium.java_client.android.options.server.SupportsSystemPortOption;
import io.appium.java_client.android.options.signing.SupportsKeystoreOptions;
import io.appium.java_client.android.options.signing.SupportsNoSignOption;
import io.appium.java_client.remote.AutomationName;
import io.appium.java_client.remote.MobilePlatform;
import io.appium.java_client.remote.options.BaseOptions;
import io.appium.java_client.remote.options.SupportsAppOption;
import io.appium.java_client.remote.options.SupportsAutoWebViewOption;
import io.appium.java_client.remote.options.SupportsDeviceNameOption;
import io.appium.java_client.remote.options.SupportsEnforceAppInstallOption;
import io.appium.java_client.remote.options.SupportsIsHeadlessOption;
import io.appium.java_client.remote.options.SupportsLanguageOption;
import io.appium.java_client.remote.options.SupportsLocaleOption;
import io.appium.java_client.remote.options.SupportsOrientationOption;
import io.appium.java_client.remote.options.SupportsOtherAppsOption;
import io.appium.java_client.remote.options.SupportsSkipLogCaptureOption;
import io.appium.java_client.remote.options.SupportsUdidOption;
import org.openqa.selenium.Capabilities;
import java.util.Map;
/**
* https://github.com/appium/appium-espresso-driver#capabilities
*/
public class EspressoOptions extends BaseOptions<EspressoOptions> implements
// General options: https://github.com/appium/appium-uiautomator2-driver#general
SupportsDeviceNameOption<EspressoOptions>,
SupportsUdidOption<EspressoOptions>,
// Driver/Server options: https://github.com/appium/appium-uiautomator2-driver#driverserver
SupportsSystemPortOption<EspressoOptions>,
SupportsSkipServerInstallationOption<EspressoOptions>,
SupportsEspressoServerLaunchTimeoutOption<EspressoOptions>,
SupportsForceEspressoRebuildOption<EspressoOptions>,
SupportsShowGradleLogOption<EspressoOptions>,
SupportsOrientationOption<EspressoOptions>,
SupportsEspressoBuildConfigOption<EspressoOptions>,
// App options: https://github.com/appium/appium-uiautomator2-driver#app
SupportsAppOption<EspressoOptions>,
SupportsAppPackageOption<EspressoOptions>,
SupportsAppActivityOption<EspressoOptions>,
SupportsAppWaitActivityOption<EspressoOptions>,
SupportsAppWaitPackageOption<EspressoOptions>,
SupportsAppWaitDurationOption<EspressoOptions>,
SupportsAndroidInstallTimeoutOption<EspressoOptions>,
SupportsIntentOptionsOption<EspressoOptions>,
SupportsActivityOptionsOption<EspressoOptions>,
SupportsAutoGrantPermissionsOption<EspressoOptions>,
SupportsOtherAppsOption<EspressoOptions>,
SupportsUninstallOtherPackagesOption<EspressoOptions>,
SupportsAllowTestPackagesOption<EspressoOptions>,
SupportsRemoteAppsCacheLimitOption<EspressoOptions>,
SupportsEnforceAppInstallOption<EspressoOptions>,
// App localization options: https://github.com/appium/appium-uiautomator2-driver#app-localization
SupportsLocaleScriptOption<EspressoOptions>,
SupportsLanguageOption<EspressoOptions>,
SupportsLocaleOption<EspressoOptions>,
SupportsAppLocaleOption<EspressoOptions>,
// ADB options: https://github.com/appium/appium-uiautomator2-driver#adb
SupportsAdbPortOption<EspressoOptions>,
SupportsRemoteAdbHostOption<EspressoOptions>,
SupportsAdbExecTimeoutOption<EspressoOptions>,
SupportsClearDeviceLogsOnStartOption<EspressoOptions>,
SupportsBuildToolsVersionOption<EspressoOptions>,
SupportsSkipLogcatCaptureOption<EspressoOptions>,
SupportsSuppressKillServerOption<EspressoOptions>,
SupportsIgnoreHiddenApiPolicyErrorOption<EspressoOptions>,
SupportsMockLocationAppOption<EspressoOptions>,
SupportsLogcatFormatOption<EspressoOptions>,
SupportsLogcatFilterSpecsOption<EspressoOptions>,
SupportsAllowDelayAdbOption<EspressoOptions>,
// AVD options: https://github.com/appium/appium-uiautomator2-driver#emulator-android-virtual-device
SupportsAvdOption<EspressoOptions>,
SupportsAvdLaunchTimeoutOption<EspressoOptions>,
SupportsAvdReadyTimeoutOption<EspressoOptions>,
SupportsAvdArgsOption<EspressoOptions>,
SupportsAvdEnvOption<EspressoOptions>,
SupportsNetworkSpeedOption<EspressoOptions>,
SupportsGpsEnabledOption<EspressoOptions>,
SupportsIsHeadlessOption<EspressoOptions>,
// App signing options: https://github.com/appium/appium-uiautomator2-driver#app-signing
SupportsKeystoreOptions<EspressoOptions>,
SupportsNoSignOption<EspressoOptions>,
// Device locking options: https://github.com/appium/appium-uiautomator2-driver#device-locking
SupportsSkipUnlockOption<EspressoOptions>,
SupportsUnlockTypeOption<EspressoOptions>,
SupportsUnlockKeyOption<EspressoOptions>,
SupportsUnlockStrategyOption<EspressoOptions>,
SupportsUnlockSuccessTimeoutOption<EspressoOptions>,
// MJPEG options: https://github.com/appium/appium-uiautomator2-driver#mjpeg
SupportsMjpegServerPortOption<EspressoOptions>,
SupportsMjpegScreenshotUrlOption<EspressoOptions>,
// Web Context options: https://github.com/appium/appium-uiautomator2-driver#web-context
SupportsAutoWebViewOption<EspressoOptions>,
SupportsWebviewDevtoolsPortOption<EspressoOptions>,
SupportsEnsureWebviewsHavePagesOption<EspressoOptions>,
SupportsChromedriverPortOption<EspressoOptions>,
SupportsChromedriverPortsOption<EspressoOptions>,
SupportsChromedriverArgsOption<EspressoOptions>,
SupportsChromedriverExecutableOption<EspressoOptions>,
SupportsChromedriverExecutableDirOption<EspressoOptions>,
SupportsChromedriverChromeMappingFileOption<EspressoOptions>,
SupportsChromedriverUseSystemExecutableOption<EspressoOptions>,
SupportsChromedriverDisableBuildCheckOption<EspressoOptions>,
SupportsAutoWebviewTimeoutOption<EspressoOptions>,
SupportsRecreateChromeDriverSessionsOption<EspressoOptions>,
SupportsNativeWebScreenshotOption<EspressoOptions>,
SupportsExtractChromeAndroidPackageFromContextNameOption<EspressoOptions>,
SupportsShowChromedriverLogOption<EspressoOptions>,
SupportsChromeOptionsOption<EspressoOptions>,
SupportsChromeLoggingPrefsOption<EspressoOptions>,
// Other options: https://github.com/appium/appium-uiautomator2-driver#other
SupportsDisableSuppressAccessibilityServiceOption<EspressoOptions>,
SupportsSkipLogCaptureOption<EspressoOptions> {
public EspressoOptions() {
setCommonOptions();
}
public EspressoOptions(Capabilities source) {
super(source);
setCommonOptions();
}
public EspressoOptions(Map<String, ?> source) {
super(source);
setCommonOptions();
}
private void setCommonOptions() {
setPlatformName(MobilePlatform.ANDROID);
setAutomationName(AutomationName.ESPRESSO);
}
}