How to use setSimulatorPasteboardAutomaticSync method of io.appium.java_client.ios.options.simulator.SupportsSimulatorPasteboardAutomaticSyncOption class

Best io.appium code snippet using io.appium.java_client.ios.options.simulator.SupportsSimulatorPasteboardAutomaticSyncOption.setSimulatorPasteboardAutomaticSync

Run io.appium automation tests on LambdaTest cloud grid

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

SupportsSimulatorPasteboardAutomaticSyncOption.java

Source: SupportsSimulatorPasteboardAutomaticSyncOption.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.simulator;
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
25public interface SupportsSimulatorPasteboardAutomaticSyncOption<T extends BaseOptions<T>> extends
26        Capabilities, CanSetCapability<T> {
27    String SIMULATOR_PASTEBOARD_AUTOMATIC_SYNC = "simulatorPasteboardAutomaticSync";
28
29    /**
30     * Handle the -PasteboardAutomaticSync flag when simulator process launches.
31     * It could improve launching simulator performance not to sync pasteboard with
32     * the system when this value is off. on forces the flag enabled. system does
33     * not provide the flag to the launching command. on, off, or system is available.
34     * They are case-insensitive. Defaults to off.
35     *
36     * @param state Either on, off or system.
37     * @return self instance for chaining.
38     */
39    default T setSimulatorPasteboardAutomaticSync(PasteboardSyncState state) {
40        return amend(SIMULATOR_PASTEBOARD_AUTOMATIC_SYNC, state.toString().toLowerCase());
41    }
42
43    /**
44     * Get the pasteboard automation sync state.
45     *
46     * @return Pasteboard sync state.
47     */
48    default Optional<PasteboardSyncState> getSimulatorPasteboardAutomaticSync() {
49        return Optional.ofNullable(getCapability(SIMULATOR_PASTEBOARD_AUTOMATIC_SYNC))
50                .map((v) -> PasteboardSyncState.valueOf(String.valueOf(v).toUpperCase()));
51    }
52}
53
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 SupportsSimulatorPasteboardAutomaticSyncOption

Trigger setSimulatorPasteboardAutomaticSync code on LambdaTest Cloud Grid

Execute automation tests with setSimulatorPasteboardAutomaticSync 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)