How to use SupportsMockLocationAppOption class of io.appium.java_client.android.options.adb package

Best io.appium code snippet using io.appium.java_client.android.options.adb.SupportsMockLocationAppOption

Run io.appium automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

EspressoOptions.java

Source: EspressoOptions.java Github

copy
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
17package io.appium.java_client.android.options;
18
19import io.appium.java_client.android.options.adb.SupportsAdbExecTimeoutOption;
20import io.appium.java_client.android.options.adb.SupportsAdbPortOption;
21import io.appium.java_client.android.options.adb.SupportsAllowDelayAdbOption;
22import io.appium.java_client.android.options.adb.SupportsBuildToolsVersionOption;
23import io.appium.java_client.android.options.adb.SupportsClearDeviceLogsOnStartOption;
24import io.appium.java_client.android.options.adb.SupportsIgnoreHiddenApiPolicyErrorOption;
25import io.appium.java_client.android.options.adb.SupportsLogcatFilterSpecsOption;
26import io.appium.java_client.android.options.adb.SupportsLogcatFormatOption;
27import io.appium.java_client.android.options.adb.SupportsMockLocationAppOption;
28import io.appium.java_client.android.options.adb.SupportsRemoteAdbHostOption;
29import io.appium.java_client.android.options.adb.SupportsSkipLogcatCaptureOption;
30import io.appium.java_client.android.options.adb.SupportsSuppressKillServerOption;
31import io.appium.java_client.android.options.app.SupportsActivityOptionsOption;
32import io.appium.java_client.android.options.app.SupportsAllowTestPackagesOption;
33import io.appium.java_client.android.options.app.SupportsAndroidInstallTimeoutOption;
34import io.appium.java_client.android.options.app.SupportsAppActivityOption;
35import io.appium.java_client.android.options.app.SupportsIntentOptionsOption;
36import io.appium.java_client.android.options.app.SupportsAppWaitDurationOption;
37import io.appium.java_client.android.options.app.SupportsAppPackageOption;
38import io.appium.java_client.android.options.app.SupportsAppWaitActivityOption;
39import io.appium.java_client.android.options.app.SupportsAppWaitPackageOption;
40import io.appium.java_client.android.options.app.SupportsAutoGrantPermissionsOption;
41import io.appium.java_client.android.options.app.SupportsEnforceAppInstallOption;
42import io.appium.java_client.android.options.app.SupportsRemoteAppsCacheLimitOption;
43import io.appium.java_client.android.options.app.SupportsUninstallOtherPackagesOption;
44import io.appium.java_client.android.options.avd.SupportsAvdArgsOption;
45import io.appium.java_client.android.options.avd.SupportsAvdEnvOption;
46import io.appium.java_client.android.options.avd.SupportsAvdLaunchTimeoutOption;
47import io.appium.java_client.android.options.avd.SupportsAvdOption;
48import io.appium.java_client.android.options.avd.SupportsAvdReadyTimeoutOption;
49import io.appium.java_client.android.options.avd.SupportsGpsEnabledOption;
50import io.appium.java_client.android.options.avd.SupportsNetworkSpeedOption;
51import io.appium.java_client.android.options.context.SupportsAutoWebviewTimeoutOption;
52import io.appium.java_client.android.options.context.SupportsChromeLoggingPrefsOption;
53import io.appium.java_client.android.options.context.SupportsChromeOptionsOption;
54import io.appium.java_client.android.options.context.SupportsChromedriverArgsOption;
55import io.appium.java_client.android.options.context.SupportsChromedriverChromeMappingFileOption;
56import io.appium.java_client.android.options.context.SupportsChromedriverDisableBuildCheckOption;
57import io.appium.java_client.android.options.context.SupportsChromedriverExecutableDirOption;
58import io.appium.java_client.android.options.context.SupportsChromedriverExecutableOption;
59import io.appium.java_client.android.options.context.SupportsChromedriverPortOption;
60import io.appium.java_client.android.options.context.SupportsChromedriverPortsOption;
61import io.appium.java_client.android.options.context.SupportsChromedriverUseSystemExecutableOption;
62import io.appium.java_client.android.options.context.SupportsEnsureWebviewsHavePagesOption;
63import io.appium.java_client.android.options.context.SupportsExtractChromeAndroidPackageFromContextNameOption;
64import io.appium.java_client.android.options.context.SupportsNativeWebScreenshotOption;
65import io.appium.java_client.android.options.context.SupportsRecreateChromeDriverSessionsOption;
66import io.appium.java_client.android.options.context.SupportsShowChromedriverLogOption;
67import io.appium.java_client.android.options.context.SupportsWebviewDevtoolsPortOption;
68import io.appium.java_client.android.options.localization.SupportsAppLocaleOption;
69import io.appium.java_client.android.options.localization.SupportsLocaleScriptOption;
70import io.appium.java_client.android.options.locking.SupportsSkipUnlockOption;
71import io.appium.java_client.android.options.locking.SupportsUnlockKeyOption;
72import io.appium.java_client.android.options.locking.SupportsUnlockStrategyOption;
73import io.appium.java_client.android.options.locking.SupportsUnlockSuccessTimeoutOption;
74import io.appium.java_client.android.options.locking.SupportsUnlockTypeOption;
75import io.appium.java_client.android.options.mjpeg.SupportsMjpegScreenshotUrlOption;
76import io.appium.java_client.android.options.mjpeg.SupportsMjpegServerPortOption;
77import io.appium.java_client.android.options.other.SupportsDisableSuppressAccessibilityServiceOption;
78import io.appium.java_client.android.options.server.SupportsEspressoBuildConfigOption;
79import io.appium.java_client.android.options.server.SupportsEspressoServerLaunchTimeoutOption;
80import io.appium.java_client.android.options.server.SupportsForceEspressoRebuildOption;
81import io.appium.java_client.android.options.server.SupportsShowGradleLogOption;
82import io.appium.java_client.android.options.server.SupportsSkipServerInstallationOption;
83import io.appium.java_client.android.options.server.SupportsSystemPortOption;
84import io.appium.java_client.android.options.signing.SupportsKeystoreOptions;
85import io.appium.java_client.android.options.signing.SupportsNoSignOption;
86import io.appium.java_client.remote.AutomationName;
87import io.appium.java_client.remote.MobilePlatform;
88import io.appium.java_client.remote.options.BaseOptions;
89import io.appium.java_client.remote.options.SupportsAppOption;
90import io.appium.java_client.remote.options.SupportsAutoWebViewOption;
91import io.appium.java_client.remote.options.SupportsDeviceNameOption;
92import io.appium.java_client.remote.options.SupportsIsHeadlessOption;
93import io.appium.java_client.remote.options.SupportsLanguageOption;
94import io.appium.java_client.remote.options.SupportsLocaleOption;
95import io.appium.java_client.remote.options.SupportsOrientationOption;
96import io.appium.java_client.remote.options.SupportsOtherAppsOption;
97import io.appium.java_client.remote.options.SupportsSkipLogCaptureOption;
98import io.appium.java_client.remote.options.SupportsUdidOption;
99import org.openqa.selenium.Capabilities;
100
101import java.util.Map;
102
103/**
104 * https://github.com/appium/appium-espresso-driver#capabilities
105 */
106public class EspressoOptions extends BaseOptions<EspressoOptions> implements
107        // General options: https://github.com/appium/appium-uiautomator2-driver#general
108        SupportsDeviceNameOption<EspressoOptions>,
109        SupportsUdidOption<EspressoOptions>,
110        // Driver/Server options: https://github.com/appium/appium-uiautomator2-driver#driverserver
111        SupportsSystemPortOption<EspressoOptions>,
112        SupportsSkipServerInstallationOption<EspressoOptions>,
113        SupportsEspressoServerLaunchTimeoutOption<EspressoOptions>,
114        SupportsForceEspressoRebuildOption<EspressoOptions>,
115        SupportsShowGradleLogOption<EspressoOptions>,
116        SupportsOrientationOption<EspressoOptions>,
117        SupportsEspressoBuildConfigOption<EspressoOptions>,
118        // App options: https://github.com/appium/appium-uiautomator2-driver#app
119        SupportsAppOption<EspressoOptions>,
120        SupportsAppPackageOption<EspressoOptions>,
121        SupportsAppActivityOption<EspressoOptions>,
122        SupportsAppWaitActivityOption<EspressoOptions>,
123        SupportsAppWaitPackageOption<EspressoOptions>,
124        SupportsAppWaitDurationOption<EspressoOptions>,
125        SupportsAndroidInstallTimeoutOption<EspressoOptions>,
126        SupportsIntentOptionsOption<EspressoOptions>,
127        SupportsActivityOptionsOption<EspressoOptions>,
128        SupportsAutoGrantPermissionsOption<EspressoOptions>,
129        SupportsOtherAppsOption<EspressoOptions>,
130        SupportsUninstallOtherPackagesOption<EspressoOptions>,
131        SupportsAllowTestPackagesOption<EspressoOptions>,
132        SupportsRemoteAppsCacheLimitOption<EspressoOptions>,
133        SupportsEnforceAppInstallOption<EspressoOptions>,
134        // App localization options: https://github.com/appium/appium-uiautomator2-driver#app-localization
135        SupportsLocaleScriptOption<EspressoOptions>,
136        SupportsLanguageOption<EspressoOptions>,
137        SupportsLocaleOption<EspressoOptions>,
138        SupportsAppLocaleOption<EspressoOptions>,
139        // ADB options: https://github.com/appium/appium-uiautomator2-driver#adb
140        SupportsAdbPortOption<EspressoOptions>,
141        SupportsRemoteAdbHostOption<EspressoOptions>,
142        SupportsAdbExecTimeoutOption<EspressoOptions>,
143        SupportsClearDeviceLogsOnStartOption<EspressoOptions>,
144        SupportsBuildToolsVersionOption<EspressoOptions>,
145        SupportsSkipLogcatCaptureOption<EspressoOptions>,
146        SupportsSuppressKillServerOption<EspressoOptions>,
147        SupportsIgnoreHiddenApiPolicyErrorOption<EspressoOptions>,
148        SupportsMockLocationAppOption<EspressoOptions>,
149        SupportsLogcatFormatOption<EspressoOptions>,
150        SupportsLogcatFilterSpecsOption<EspressoOptions>,
151        SupportsAllowDelayAdbOption<EspressoOptions>,
152        // AVD options: https://github.com/appium/appium-uiautomator2-driver#emulator-android-virtual-device
153        SupportsAvdOption<EspressoOptions>,
154        SupportsAvdLaunchTimeoutOption<EspressoOptions>,
155        SupportsAvdReadyTimeoutOption<EspressoOptions>,
156        SupportsAvdArgsOption<EspressoOptions>,
157        SupportsAvdEnvOption<EspressoOptions>,
158        SupportsNetworkSpeedOption<EspressoOptions>,
159        SupportsGpsEnabledOption<EspressoOptions>,
160        SupportsIsHeadlessOption<EspressoOptions>,
161        // App signing options: https://github.com/appium/appium-uiautomator2-driver#app-signing
162        SupportsKeystoreOptions<EspressoOptions>,
163        SupportsNoSignOption<EspressoOptions>,
164        // Device locking options: https://github.com/appium/appium-uiautomator2-driver#device-locking
165        SupportsSkipUnlockOption<EspressoOptions>,
166        SupportsUnlockTypeOption<EspressoOptions>,
167        SupportsUnlockKeyOption<EspressoOptions>,
168        SupportsUnlockStrategyOption<EspressoOptions>,
169        SupportsUnlockSuccessTimeoutOption<EspressoOptions>,
170        // MJPEG options: https://github.com/appium/appium-uiautomator2-driver#mjpeg
171        SupportsMjpegServerPortOption<EspressoOptions>,
172        SupportsMjpegScreenshotUrlOption<EspressoOptions>,
173        // Web Context options: https://github.com/appium/appium-uiautomator2-driver#web-context
174        SupportsAutoWebViewOption<EspressoOptions>,
175        SupportsWebviewDevtoolsPortOption<EspressoOptions>,
176        SupportsEnsureWebviewsHavePagesOption<EspressoOptions>,
177        SupportsChromedriverPortOption<EspressoOptions>,
178        SupportsChromedriverPortsOption<EspressoOptions>,
179        SupportsChromedriverArgsOption<EspressoOptions>,
180        SupportsChromedriverExecutableOption<EspressoOptions>,
181        SupportsChromedriverExecutableDirOption<EspressoOptions>,
182        SupportsChromedriverChromeMappingFileOption<EspressoOptions>,
183        SupportsChromedriverUseSystemExecutableOption<EspressoOptions>,
184        SupportsChromedriverDisableBuildCheckOption<EspressoOptions>,
185        SupportsAutoWebviewTimeoutOption<EspressoOptions>,
186        SupportsRecreateChromeDriverSessionsOption<EspressoOptions>,
187        SupportsNativeWebScreenshotOption<EspressoOptions>,
188        SupportsExtractChromeAndroidPackageFromContextNameOption<EspressoOptions>,
189        SupportsShowChromedriverLogOption<EspressoOptions>,
190        SupportsChromeOptionsOption<EspressoOptions>,
191        SupportsChromeLoggingPrefsOption<EspressoOptions>,
192        // Other options: https://github.com/appium/appium-uiautomator2-driver#other
193        SupportsDisableSuppressAccessibilityServiceOption<EspressoOptions>,
194        SupportsSkipLogCaptureOption<EspressoOptions> {
195    public EspressoOptions() {
196        setCommonOptions();
197    }
198
199    public EspressoOptions(Capabilities source) {
200        super(source);
201        setCommonOptions();
202    }
203
204    public EspressoOptions(Map<String, ?> source) {
205        super(source);
206        setCommonOptions();
207    }
208
209    private void setCommonOptions() {
210        setPlatformName(MobilePlatform.ANDROID);
211        setAutomationName(AutomationName.ESPRESSO);
212    }
213}
214
Full Screen

UiAutomator2Options.java

Source: UiAutomator2Options.java Github

copy
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
17package io.appium.java_client.android.options;
18
19import io.appium.java_client.android.options.adb.SupportsAdbExecTimeoutOption;
20import io.appium.java_client.android.options.adb.SupportsAdbPortOption;
21import io.appium.java_client.android.options.adb.SupportsAllowDelayAdbOption;
22import io.appium.java_client.android.options.adb.SupportsBuildToolsVersionOption;
23import io.appium.java_client.android.options.adb.SupportsClearDeviceLogsOnStartOption;
24import io.appium.java_client.android.options.adb.SupportsIgnoreHiddenApiPolicyErrorOption;
25import io.appium.java_client.android.options.adb.SupportsLogcatFilterSpecsOption;
26import io.appium.java_client.android.options.adb.SupportsLogcatFormatOption;
27import io.appium.java_client.android.options.adb.SupportsMockLocationAppOption;
28import io.appium.java_client.android.options.adb.SupportsRemoteAdbHostOption;
29import io.appium.java_client.android.options.adb.SupportsSkipLogcatCaptureOption;
30import io.appium.java_client.android.options.adb.SupportsSuppressKillServerOption;
31import io.appium.java_client.android.options.app.SupportsAllowTestPackagesOption;
32import io.appium.java_client.android.options.app.SupportsAndroidInstallTimeoutOption;
33import io.appium.java_client.android.options.app.SupportsAppActivityOption;
34import io.appium.java_client.android.options.app.SupportsAppWaitDurationOption;
35import io.appium.java_client.android.options.app.SupportsAppPackageOption;
36import io.appium.java_client.android.options.app.SupportsAppWaitActivityOption;
37import io.appium.java_client.android.options.app.SupportsAppWaitForLaunchOption;
38import io.appium.java_client.android.options.app.SupportsAppWaitPackageOption;
39import io.appium.java_client.android.options.app.SupportsAutoGrantPermissionsOption;
40import io.appium.java_client.android.options.app.SupportsEnforceAppInstallOption;
41import io.appium.java_client.android.options.app.SupportsIntentActionOption;
42import io.appium.java_client.android.options.app.SupportsIntentCategoryOption;
43import io.appium.java_client.android.options.app.SupportsIntentFlagsOption;
44import io.appium.java_client.android.options.app.SupportsOptionalIntentArgumentsOption;
45import io.appium.java_client.android.options.app.SupportsRemoteAppsCacheLimitOption;
46import io.appium.java_client.android.options.app.SupportsUninstallOtherPackagesOption;
47import io.appium.java_client.android.options.avd.SupportsAvdArgsOption;
48import io.appium.java_client.android.options.avd.SupportsAvdEnvOption;
49import io.appium.java_client.android.options.avd.SupportsAvdLaunchTimeoutOption;
50import io.appium.java_client.android.options.avd.SupportsAvdOption;
51import io.appium.java_client.android.options.avd.SupportsAvdReadyTimeoutOption;
52import io.appium.java_client.android.options.avd.SupportsGpsEnabledOption;
53import io.appium.java_client.remote.options.SupportsIsHeadlessOption;
54import io.appium.java_client.android.options.avd.SupportsNetworkSpeedOption;
55import io.appium.java_client.android.options.context.SupportsAutoWebviewTimeoutOption;
56import io.appium.java_client.android.options.context.SupportsChromeLoggingPrefsOption;
57import io.appium.java_client.android.options.context.SupportsChromeOptionsOption;
58import io.appium.java_client.android.options.context.SupportsChromedriverArgsOption;
59import io.appium.java_client.android.options.context.SupportsChromedriverChromeMappingFileOption;
60import io.appium.java_client.android.options.context.SupportsChromedriverDisableBuildCheckOption;
61import io.appium.java_client.android.options.context.SupportsChromedriverExecutableDirOption;
62import io.appium.java_client.android.options.context.SupportsChromedriverExecutableOption;
63import io.appium.java_client.android.options.context.SupportsChromedriverPortOption;
64import io.appium.java_client.android.options.context.SupportsChromedriverPortsOption;
65import io.appium.java_client.android.options.context.SupportsChromedriverUseSystemExecutableOption;
66import io.appium.java_client.android.options.context.SupportsEnsureWebviewsHavePagesOption;
67import io.appium.java_client.android.options.context.SupportsExtractChromeAndroidPackageFromContextNameOption;
68import io.appium.java_client.android.options.context.SupportsNativeWebScreenshotOption;
69import io.appium.java_client.android.options.context.SupportsRecreateChromeDriverSessionsOption;
70import io.appium.java_client.android.options.context.SupportsShowChromedriverLogOption;
71import io.appium.java_client.android.options.context.SupportsWebviewDevtoolsPortOption;
72import io.appium.java_client.android.options.localization.SupportsLocaleScriptOption;
73import io.appium.java_client.android.options.locking.SupportsSkipUnlockOption;
74import io.appium.java_client.android.options.locking.SupportsUnlockKeyOption;
75import io.appium.java_client.android.options.locking.SupportsUnlockStrategyOption;
76import io.appium.java_client.android.options.locking.SupportsUnlockSuccessTimeoutOption;
77import io.appium.java_client.android.options.locking.SupportsUnlockTypeOption;
78import io.appium.java_client.android.options.mjpeg.SupportsMjpegScreenshotUrlOption;
79import io.appium.java_client.android.options.mjpeg.SupportsMjpegServerPortOption;
80import io.appium.java_client.android.options.other.SupportsDisableSuppressAccessibilityServiceOption;
81import io.appium.java_client.remote.options.SupportsSkipLogCaptureOption;
82import io.appium.java_client.android.options.other.SupportsUserProfileOption;
83import io.appium.java_client.android.options.server.SupportsDisableWindowAnimationOption;
84import io.appium.java_client.android.options.server.SupportsSkipDeviceInitializationOption;
85import io.appium.java_client.android.options.server.SupportsSkipServerInstallationOption;
86import io.appium.java_client.android.options.server.SupportsSystemPortOption;
87import io.appium.java_client.android.options.server.SupportsUiautomator2ServerInstallTimeoutOption;
88import io.appium.java_client.android.options.server.SupportsUiautomator2ServerLaunchTimeoutOption;
89import io.appium.java_client.android.options.server.SupportsUiautomator2ServerReadTimeoutOption;
90import io.appium.java_client.android.options.signing.SupportsKeystoreOptions;
91import io.appium.java_client.android.options.signing.SupportsNoSignOption;
92import io.appium.java_client.remote.AutomationName;
93import io.appium.java_client.remote.MobilePlatform;
94import io.appium.java_client.remote.options.BaseOptions;
95import io.appium.java_client.remote.options.SupportsAppOption;
96import io.appium.java_client.remote.options.SupportsAutoWebViewOption;
97import io.appium.java_client.remote.options.SupportsClearSystemFilesOption;
98import io.appium.java_client.remote.options.SupportsDeviceNameOption;
99import io.appium.java_client.remote.options.SupportsEnablePerformanceLoggingOption;
100import io.appium.java_client.remote.options.SupportsLanguageOption;
101import io.appium.java_client.remote.options.SupportsLocaleOption;
102import io.appium.java_client.remote.options.SupportsOrientationOption;
103import io.appium.java_client.remote.options.SupportsOtherAppsOption;
104import io.appium.java_client.remote.options.SupportsUdidOption;
105import org.openqa.selenium.Capabilities;
106
107import java.util.Map;
108
109/**
110 * https://github.com/appium/appium-uiautomator2-driver#capabilities
111 */
112public class UiAutomator2Options extends BaseOptions<UiAutomator2Options> implements
113        // General options: https://github.com/appium/appium-uiautomator2-driver#general
114        SupportsDeviceNameOption<UiAutomator2Options>,
115        SupportsUdidOption<UiAutomator2Options>,
116        // Driver/Server options: https://github.com/appium/appium-uiautomator2-driver#driverserver
117        SupportsSystemPortOption<UiAutomator2Options>,
118        SupportsSkipServerInstallationOption<UiAutomator2Options>,
119        SupportsUiautomator2ServerLaunchTimeoutOption<UiAutomator2Options>,
120        SupportsUiautomator2ServerInstallTimeoutOption<UiAutomator2Options>,
121        SupportsUiautomator2ServerReadTimeoutOption<UiAutomator2Options>,
122        SupportsDisableWindowAnimationOption<UiAutomator2Options>,
123        SupportsSkipDeviceInitializationOption<UiAutomator2Options>,
124        SupportsOrientationOption<UiAutomator2Options>,
125        SupportsClearSystemFilesOption<UiAutomator2Options>,
126        SupportsEnablePerformanceLoggingOption<UiAutomator2Options>,
127        // App options: https://github.com/appium/appium-uiautomator2-driver#app
128        SupportsAppOption<UiAutomator2Options>,
129        SupportsAppPackageOption<UiAutomator2Options>,
130        SupportsAppActivityOption<UiAutomator2Options>,
131        SupportsAppWaitActivityOption<UiAutomator2Options>,
132        SupportsAppWaitPackageOption<UiAutomator2Options>,
133        SupportsAppWaitDurationOption<UiAutomator2Options>,
134        SupportsAndroidInstallTimeoutOption<UiAutomator2Options>,
135        SupportsAppWaitForLaunchOption<UiAutomator2Options>,
136        SupportsIntentCategoryOption<UiAutomator2Options>,
137        SupportsIntentActionOption<UiAutomator2Options>,
138        SupportsIntentFlagsOption<UiAutomator2Options>,
139        SupportsOptionalIntentArgumentsOption<UiAutomator2Options>,
140        SupportsAutoGrantPermissionsOption<UiAutomator2Options>,
141        SupportsOtherAppsOption<UiAutomator2Options>,
142        SupportsUninstallOtherPackagesOption<UiAutomator2Options>,
143        SupportsAllowTestPackagesOption<UiAutomator2Options>,
144        SupportsRemoteAppsCacheLimitOption<UiAutomator2Options>,
145        SupportsEnforceAppInstallOption<UiAutomator2Options>,
146        // App localization options: https://github.com/appium/appium-uiautomator2-driver#app-localization
147        SupportsLocaleScriptOption<UiAutomator2Options>,
148        SupportsLanguageOption<UiAutomator2Options>,
149        SupportsLocaleOption<UiAutomator2Options>,
150        // ADB options: https://github.com/appium/appium-uiautomator2-driver#adb
151        SupportsAdbPortOption<UiAutomator2Options>,
152        SupportsRemoteAdbHostOption<UiAutomator2Options>,
153        SupportsAdbExecTimeoutOption<UiAutomator2Options>,
154        SupportsClearDeviceLogsOnStartOption<UiAutomator2Options>,
155        SupportsBuildToolsVersionOption<UiAutomator2Options>,
156        SupportsSkipLogcatCaptureOption<UiAutomator2Options>,
157        SupportsSuppressKillServerOption<UiAutomator2Options>,
158        SupportsIgnoreHiddenApiPolicyErrorOption<UiAutomator2Options>,
159        SupportsMockLocationAppOption<UiAutomator2Options>,
160        SupportsLogcatFormatOption<UiAutomator2Options>,
161        SupportsLogcatFilterSpecsOption<UiAutomator2Options>,
162        SupportsAllowDelayAdbOption<UiAutomator2Options>,
163        // AVD options: https://github.com/appium/appium-uiautomator2-driver#emulator-android-virtual-device
164        SupportsAvdOption<UiAutomator2Options>,
165        SupportsAvdLaunchTimeoutOption<UiAutomator2Options>,
166        SupportsAvdReadyTimeoutOption<UiAutomator2Options>,
167        SupportsAvdArgsOption<UiAutomator2Options>,
168        SupportsAvdEnvOption<UiAutomator2Options>,
169        SupportsNetworkSpeedOption<UiAutomator2Options>,
170        SupportsGpsEnabledOption<UiAutomator2Options>,
171        SupportsIsHeadlessOption<UiAutomator2Options>,
172        // App signing options: https://github.com/appium/appium-uiautomator2-driver#app-signing
173        SupportsKeystoreOptions<UiAutomator2Options>,
174        SupportsNoSignOption<UiAutomator2Options>,
175        // Device locking options: https://github.com/appium/appium-uiautomator2-driver#device-locking
176        SupportsSkipUnlockOption<UiAutomator2Options>,
177        SupportsUnlockTypeOption<UiAutomator2Options>,
178        SupportsUnlockKeyOption<UiAutomator2Options>,
179        SupportsUnlockStrategyOption<UiAutomator2Options>,
180        SupportsUnlockSuccessTimeoutOption<UiAutomator2Options>,
181        // MJPEG options: https://github.com/appium/appium-uiautomator2-driver#mjpeg
182        SupportsMjpegServerPortOption<UiAutomator2Options>,
183        SupportsMjpegScreenshotUrlOption<UiAutomator2Options>,
184        // Web Context options: https://github.com/appium/appium-uiautomator2-driver#web-context
185        SupportsAutoWebViewOption<UiAutomator2Options>,
186        SupportsWebviewDevtoolsPortOption<UiAutomator2Options>,
187        SupportsEnsureWebviewsHavePagesOption<UiAutomator2Options>,
188        SupportsChromedriverPortOption<UiAutomator2Options>,
189        SupportsChromedriverPortsOption<UiAutomator2Options>,
190        SupportsChromedriverArgsOption<UiAutomator2Options>,
191        SupportsChromedriverExecutableOption<UiAutomator2Options>,
192        SupportsChromedriverExecutableDirOption<UiAutomator2Options>,
193        SupportsChromedriverChromeMappingFileOption<UiAutomator2Options>,
194        SupportsChromedriverUseSystemExecutableOption<UiAutomator2Options>,
195        SupportsChromedriverDisableBuildCheckOption<UiAutomator2Options>,
196        SupportsAutoWebviewTimeoutOption<UiAutomator2Options>,
197        SupportsRecreateChromeDriverSessionsOption<UiAutomator2Options>,
198        SupportsNativeWebScreenshotOption<UiAutomator2Options>,
199        SupportsExtractChromeAndroidPackageFromContextNameOption<UiAutomator2Options>,
200        SupportsShowChromedriverLogOption<UiAutomator2Options>,
201        SupportsChromeOptionsOption<UiAutomator2Options>,
202        SupportsChromeLoggingPrefsOption<UiAutomator2Options>,
203        // Other options: https://github.com/appium/appium-uiautomator2-driver#other
204        SupportsDisableSuppressAccessibilityServiceOption<UiAutomator2Options>,
205        SupportsUserProfileOption<UiAutomator2Options>,
206        SupportsSkipLogCaptureOption<UiAutomator2Options> {
207    public UiAutomator2Options() {
208        setCommonOptions();
209    }
210
211    public UiAutomator2Options(Capabilities source) {
212        super(source);
213        setCommonOptions();
214    }
215
216    public UiAutomator2Options(Map<String, ?> source) {
217        super(source);
218        setCommonOptions();
219    }
220
221    private void setCommonOptions() {
222        setPlatformName(MobilePlatform.ANDROID);
223        setAutomationName(AutomationName.ANDROID_UIAUTOMATOR2);
224    }
225}
226
Full Screen

Accelerate Your Automation Test Cycles With LambdaTest

Leverage LambdaTest’s cloud-based platform to execute your automation tests in parallel and trim down your test execution time significantly. Your first 100 automation testing minutes are on us.

Try LambdaTest

Most used methods in SupportsMockLocationAppOption

Run Selenium Automation Tests on LambdaTest Cloud Grid

Trigger Selenium automation tests on a cloud-based Grid of 3000+ real browsers and operating systems.

Test now for Free
LambdaTestX

We use cookies to give you the best experience. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. Learn More in our Cookies policy, Privacy & Terms of service

Allow Cookie
Sarah

I hope you find the best code examples for your project.

If you want to accelerate automated browser testing, try LambdaTest. Your first 100 automation testing minutes are FREE.

Sarah Elson (Product & Growth Lead)