Search in sources :

Example 1 with SafariDriverService

use of org.openqa.selenium.safari.SafariDriverService in project selenide by selenide.

the class SafariDriverFactory method create.

@Nonnull
@CheckReturnValue
@Override
public WebDriver create(Config config, Browser browser, @Nullable Proxy proxy, @Nullable File browserDownloadsFolder) {
    SafariDriverService driverService = createDriverService(config);
    SafariOptions capabilities = createCapabilities(config, browser, proxy, browserDownloadsFolder);
    return new SafariDriver(driverService, capabilities);
}
Also used : SafariDriverService(org.openqa.selenium.safari.SafariDriverService) SafariOptions(org.openqa.selenium.safari.SafariOptions) SafariDriver(org.openqa.selenium.safari.SafariDriver) CheckReturnValue(javax.annotation.CheckReturnValue) Nonnull(javax.annotation.Nonnull)

Example 2 with SafariDriverService

use of org.openqa.selenium.safari.SafariDriverService in project selenium_java by sergueik.

the class SafariDriverFactory method newInstance.

@Override
public WebDriver newInstance(DriverOptions driverOptions) {
    if (!OS.isFamilyMac())
        throw new UnsupportedOperationException("Unsupported platform: " + Platform.getCurrent());
    SafariDriverService service = setupBuilder(new SafariDriverService.Builder(), driverOptions, null).build();
    SafariOptions options = newSafariOptions(driverOptions);
    options.merge(driverOptions.getCapabilities());
    SafariDriver driver = new SafariDriver(service, options);
    setInitialWindowSize(driver, driverOptions);
    return driver;
}
Also used : SafariDriverService(org.openqa.selenium.safari.SafariDriverService) SafariOptions(org.openqa.selenium.safari.SafariOptions) SafariDriver(org.openqa.selenium.safari.SafariDriver)

Example 3 with SafariDriverService

use of org.openqa.selenium.safari.SafariDriverService in project selenese-runner-java by vmi.

the class SafariDriverFactory method newInstance.

@Override
public WebDriver newInstance(DriverOptions driverOptions) {
    if (!OS.isFamilyMac())
        throw new UnsupportedOperationException("Unsupported platform: " + Platform.getCurrent());
    SafariDriverService service = setupBuilder(new SafariDriverService.Builder(), driverOptions, null).build();
    SafariOptions options = newSafariOptions(driverOptions);
    options.merge(driverOptions.getCapabilities());
    SafariDriver driver = new SafariDriver(service, options);
    setInitialWindowSize(driver, driverOptions);
    return driver;
}
Also used : SafariDriverService(org.openqa.selenium.safari.SafariDriverService) SafariOptions(org.openqa.selenium.safari.SafariOptions) SafariDriver(org.openqa.selenium.safari.SafariDriver)

Aggregations

SafariDriver (org.openqa.selenium.safari.SafariDriver)3 SafariDriverService (org.openqa.selenium.safari.SafariDriverService)3 SafariOptions (org.openqa.selenium.safari.SafariOptions)3 CheckReturnValue (javax.annotation.CheckReturnValue)1 Nonnull (javax.annotation.Nonnull)1