How to use SupportsBrowserNameOption class of io.appium.java_client.remote.options package

Best io.appium code snippet using io.appium.java_client.remote.options.SupportsBrowserNameOption

Run io.appium automation tests on LambdaTest cloud grid

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

GeckoOptions.java

Source: GeckoOptions.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.gecko.options;
18
19import io.appium.java_client.mac.options.SupportsSystemPortOption;
20import io.appium.java_client.remote.AutomationName;
21import io.appium.java_client.remote.options.BaseOptions;
22import io.appium.java_client.remote.options.SupportsAcceptInsecureCertsOption;
23import io.appium.java_client.remote.options.SupportsBrowserNameOption;
24import io.appium.java_client.remote.options.SupportsBrowserVersionOption;
25import io.appium.java_client.remote.options.SupportsPageLoadStrategyOption;
26import io.appium.java_client.remote.options.SupportsProxyOption;
27import io.appium.java_client.remote.options.SupportsSetWindowRectOption;
28import io.appium.java_client.remote.options.SupportsUnhandledPromptBehaviorOption;
29import org.openqa.selenium.Capabilities;
30
31import java.util.Map;
32
33/**
34 * https://github.com/appium/appium-geckodriver#usage
35 */
36public class GeckoOptions extends BaseOptions<GeckoOptions> implements
37        SupportsBrowserNameOption<GeckoOptions>,
38        SupportsBrowserVersionOption<GeckoOptions>,
39        SupportsMarionettePortOption<GeckoOptions>,
40        SupportsSystemPortOption<GeckoOptions>,
41        SupportsVerbosityOption<GeckoOptions>,
42        SupportsAndroidStorageOption<GeckoOptions>,
43        SupportsMozFirefoxOptionsOption<GeckoOptions>,
44        SupportsAcceptInsecureCertsOption<GeckoOptions>,
45        SupportsPageLoadStrategyOption<GeckoOptions>,
46        SupportsSetWindowRectOption<GeckoOptions>,
47        SupportsProxyOption<GeckoOptions>,
48        SupportsUnhandledPromptBehaviorOption<GeckoOptions> {
49    public GeckoOptions() {
50        setCommonOptions();
51    }
52
53    public GeckoOptions(Capabilities source) {
54        super(source);
55        setCommonOptions();
56    }
57
58    public GeckoOptions(Map<String, ?> source) {
59        super(source);
60        setCommonOptions();
61    }
62
63    private void setCommonOptions() {
64        setAutomationName(AutomationName.GECKO);
65    }
66}
67
Full Screen

SafariOptions.java

Source: SafariOptions.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.safari.options;
18
19import io.appium.java_client.remote.AutomationName;
20import io.appium.java_client.remote.options.BaseOptions;
21import io.appium.java_client.remote.options.SupportsAcceptInsecureCertsOption;
22import io.appium.java_client.remote.options.SupportsBrowserNameOption;
23import io.appium.java_client.remote.options.SupportsBrowserVersionOption;
24import io.appium.java_client.remote.options.SupportsPageLoadStrategyOption;
25import io.appium.java_client.remote.options.SupportsProxyOption;
26import io.appium.java_client.remote.options.SupportsSetWindowRectOption;
27import io.appium.java_client.remote.options.SupportsUnhandledPromptBehaviorOption;
28import org.openqa.selenium.Capabilities;
29import org.openqa.selenium.Platform;
30
31import java.util.Map;
32
33/**
34 * https://github.com/appium/appium-safari-driver#usage
35 */
36public class SafariOptions extends BaseOptions<SafariOptions> implements
37        SupportsBrowserNameOption<SafariOptions>,
38        SupportsBrowserVersionOption<SafariOptions>,
39        SupportsSafariPlatformVersionOption<SafariOptions>,
40        SupportsSafariPlatformBuildVersionOption<SafariOptions>,
41        SupportsSafariUseSimulatorOption<SafariOptions>,
42        SupportsSafariDeviceTypeOption<SafariOptions>,
43        SupportsSafariDeviceNameOption<SafariOptions>,
44        SupportsSafariDeviceUdidOption<SafariOptions>,
45        SupportsSafariAutomaticInspectionOption<SafariOptions>,
46        SupportsSafariAutomaticProfilingOption<SafariOptions>,
47        SupportsWebkitWebrtcOption<SafariOptions>,
48        SupportsAcceptInsecureCertsOption<SafariOptions>,
49        SupportsPageLoadStrategyOption<SafariOptions>,
50        SupportsSetWindowRectOption<SafariOptions>,
51        SupportsProxyOption<SafariOptions>,
52        SupportsUnhandledPromptBehaviorOption<SafariOptions> {
53    public SafariOptions() {
54        setCommonOptions();
55    }
56
57    public SafariOptions(Capabilities source) {
58        super(source);
59        setCommonOptions();
60    }
61
62    public SafariOptions(Map<String, ?> source) {
63        super(source);
64        setCommonOptions();
65    }
66
67    private void setCommonOptions() {
68        setPlatformName(Platform.IOS.toString());
69        setAutomationName(AutomationName.SAFARI);
70    }
71}
72
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 SupportsBrowserNameOption

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)