How to use doesUseXctestrunFile method of io.appium.java_client.ios.options.wda.SupportsUseXctestrunFileOption class

Best io.appium code snippet using io.appium.java_client.ios.options.wda.SupportsUseXctestrunFileOption.doesUseXctestrunFile

Run io.appium automation tests on LambdaTest cloud grid

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

SupportsUseXctestrunFileOption.java

Source: SupportsUseXctestrunFileOption.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.ios.options.wda;
18
19import io.appium.java_client.remote.options.BaseOptions;
20import io.appium.java_client.remote.options.CanSetCapability;
21import org.openqa.selenium.Capabilities;
22
23import java.util.Optional;
24
25import static io.appium.java_client.internal.CapabilityHelpers.toSafeBoolean;
26
27public interface SupportsUseXctestrunFileOption<T extends BaseOptions<T>> extends
28        Capabilities, CanSetCapability<T> {
29    String USE_XCTESTRUN_FILE_OPTION = "useXctestrunFile";
30
31    /**
32     * Enforce usage of .xctestrun file to launch WDA.
33     *
34     * @return self instance for chaining.
35     */
36    default T useXctestrunFile() {
37        return amend(USE_XCTESTRUN_FILE_OPTION, true);
38    }
39
40    /**
41     * Use Xctestrun file to launch WDA. It will search for such file in bootstrapPath.
42     * Expected name of file is WebDriverAgentRunner_iphoneos&lt;sdkVersion&gt;-arm64.xctestrun for
43     * real device and WebDriverAgentRunner_iphonesimulator&lt;sdkVersion&gt;-x86_64.xctestrun for
44     * simulator. One can do build-for-testing for WebDriverAgent project for simulator and
45     * real device and then you will see Product Folder like this and you need to copy content
46     * of this folder at bootstrapPath location. Since this capability expects that you have
47     * already built WDA project, it neither checks whether you have necessary dependencies to
48     * build WDA nor will it try to build project. Defaults to false. Tips: Xcodebuild builds for the
49     * target platform version. We'd recommend you to build with minimal OS version which you'd
50     * like to run as the original WDA module. e.g. If you build WDA for 12.2, the module cannot
51     * run on iOS 11.4 because of loading some module error on simulator. A module built with 11.4
52     * can work on iOS 12.2. (This is xcodebuild's expected behaviour.)
53     *
54     * @param value Whether to use .xctestrun file to launch WDA.
55     * @return self instance for chaining.
56     */
57    default T setUseXctestrunFile(boolean value) {
58        return amend(USE_XCTESTRUN_FILE_OPTION, value);
59    }
60
61    /**
62     * Get whether to use of .xctestrun file to launch WDA
63     *
64     * @return True or false.
65     */
66    default Optional<Boolean> doesUseXctestrunFile() {
67        return Optional.ofNullable(toSafeBoolean(getCapability(USE_XCTESTRUN_FILE_OPTION)));
68    }
69}
70
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 method in SupportsUseXctestrunFileOption

Trigger doesUseXctestrunFile code on LambdaTest Cloud Grid

Execute automation tests with doesUseXctestrunFile on a cloud-based Grid of 3000+ real browsers and operating systems for both web and mobile applications.

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)