All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aquality.selenium.configuration.driversettings.OperaSettings Maven / Gradle / Ivy

There is a newer version: 4.9.0
Show newest version
package aquality.selenium.configuration.driversettings;

import aquality.selenium.browser.BrowserName;
import aquality.selenium.core.utilities.ISettingsFile;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.AbstractDriverOptions;

public class OperaSettings extends ChromeSettings {
    private static final String DEFAULT_BINARY_LOCATION = "%USERPROFILE%\\AppData\\Local\\Programs\\Opera\\launcher.exe";
    public OperaSettings(ISettingsFile settingsFile) {
        super(settingsFile);
    }

    @Override
    public AbstractDriverOptions getDriverOptions() {
        ChromeOptions options = (ChromeOptions) super.getDriverOptions();
        options.setExperimentalOption("w3c", true);
        options.setBinary(getBinaryLocation(DEFAULT_BINARY_LOCATION));
        return options;
    }

    @Override
    public BrowserName getBrowserName() {
        return BrowserName.OPERA;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy