Codota Logo
FirefoxOptions.merge
Code IndexAdd Codota to your IDE (free)

How to use
merge
method
in
org.openqa.selenium.firefox.FirefoxOptions

Best Java code snippets using org.openqa.selenium.firefox.FirefoxOptions.merge (Showing top 11 results out of 315)

  • Common ways to obtain FirefoxOptions
private void myMethod () {
FirefoxOptions f =
  • Codota Iconnew FirefoxOptions()
  • Codota IconCapabilities source;new FirefoxOptions(source)
  • Codota IconCapabilities capabilities;new FirefoxOptions().merge(capabilities)
  • Smart code suggestions by Codota
}
origin: selenide/selenide

FirefoxOptions createFirefoxOptions(Config config, Proxy proxy) {
 FirefoxOptions firefoxOptions = new FirefoxOptions();
 firefoxOptions.setHeadless(config.headless());
 if (!config.browserBinary().isEmpty()) {
  log.info("Using browser binary: " + config.browserBinary());
  firefoxOptions.setBinary(config.browserBinary());
 }
 firefoxOptions.addPreference("network.automatic-ntlm-auth.trusted-uris", "http://,https://");
 firefoxOptions.addPreference("network.automatic-ntlm-auth.allow-non-fqdn", true);
 firefoxOptions.addPreference("network.negotiate-auth.delegation-uris", "http://,https://");
 firefoxOptions.addPreference("network.negotiate-auth.trusted-uris", "http://,https://");
 firefoxOptions.addPreference("network.http.phishy-userpass-length", 255);
 firefoxOptions.addPreference("security.csp.enable", false);
 firefoxOptions.addPreference("network.proxy.no_proxies_on", "");
 firefoxOptions.merge(createCommonCapabilities(config, proxy));
 firefoxOptions = transferFirefoxProfileFromSystemProperties(firefoxOptions);
 return firefoxOptions;
}
origin: seleniumQuery/seleniumQuery

/**
 * Configures the driver with the given capabilities.
 * Merges the {@link DesiredCapabilities} into the currently configured {@link FirefoxOptions} that will
 * be used in the driver being built.
 *
 * @param desiredCapabilities The capabilities to be set.
 * @return A self reference for further configuration.
 * @since 0.18.0
 */
@Override
public FirefoxDriverBuilder withCapabilities(DesiredCapabilities desiredCapabilities) {
  getInitializedFirefoxOptions().merge(desiredCapabilities);
  return this;
}
origin: seleniumQuery/seleniumQuery

/**
 * Configures the driver with the given capabilities.
 * Merges the {@link DesiredCapabilities} into the currently configured {@link FirefoxOptions} that will
 * be used in the driver being built.
 *
 * @param desiredCapabilities The capabilities to be set.
 * @return A self reference for further configuration.
 * @since 0.18.0
 */
@Override
public FirefoxDriverBuilder withCapabilities(DesiredCapabilities desiredCapabilities) {
  getInitializedFirefoxOptions().merge(desiredCapabilities);
  return this;
}
origin: Frameworkium/frameworkium-core

  @Override
  public WebDriver getWebDriver(Capabilities capabilities) {
    final FirefoxOptions firefoxOptions;
    if (capabilities instanceof FirefoxOptions) {
      firefoxOptions = (FirefoxOptions) capabilities;
    } else {
      firefoxOptions = new FirefoxOptions().merge(capabilities);
    }
    return new FirefoxDriver(firefoxOptions);
  }
}
origin: opencredo/test-automation-quickstart

protected static WebDriver getFirefoxDriver(DesiredCapabilities capabilities) {
  FirefoxOptions firefoxOptions = new FirefoxOptions().merge(capabilities);
  return new FirefoxDriver(firefoxOptions);
}
origin: bonigarcia/selenium-jupiter

@Override
public void resolve() {
  try {
    Optional<Object> testInstance = context.getTestInstance();
    Optional<Capabilities> capabilities = annotationsReader
        .getCapabilities(parameter, testInstance);
    FirefoxOptions firefoxOptions = (FirefoxOptions) getOptions(
        parameter, testInstance);
    if (capabilities.isPresent()) {
      firefoxOptions.merge(capabilities.get());
    }
    object = new FirefoxDriver(firefoxOptions);
  } catch (Exception e) {
    handleException(e);
  }
}
origin: alfa-laboratory/akita

/**
 * Задает options для запуска Firefox драйвера
 * options можно передавать, как системную переменную, например -Doptions=--load-extension=my-custom-extension
 * @return FirefoxOptions
 */
private FirefoxOptions getFirefoxDriverOptions(DesiredCapabilities capabilities) {
  log.info("---------------Firefox Driver---------------------");
  FirefoxOptions firefoxOptions = !options[0].equals("") ? new FirefoxOptions().addArguments(options) : new FirefoxOptions();
  capabilities.setVersion(loadSystemPropertyOrDefault(CapabilityType.BROWSER_VERSION, VERSION_LATEST));
  firefoxOptions.setHeadless(getHeadless());
  firefoxOptions.merge(capabilities);
  return firefoxOptions;
}
origin: viltgroup/minium

  @Override
  public WebDriver create(WebDriverFactory webDriverFactory, DesiredCapabilities desiredCapabilities) {
    FirefoxDriverServiceProperties serviceProperties = webDriverFactory.driverServices == null ? null : webDriverFactory.driverServices.getFirefox();
    DriverService driverService = serviceProperties == null ? null : serviceProperties.getDriverService();
    FirefoxOptions firefoxOptions = new FirefoxOptions().merge(desiredCapabilities);
    return driverService == null ? new FirefoxDriver(firefoxOptions) : new RemoteWebDriver(driverService.getUrl(), firefoxOptions);
  }
},
origin: mozilla/zest

firefoxOptions.merge(cap);
origin: bonigarcia/selenium-jupiter

if (optionsFromAnnotatedField != null) {
  firefoxOptions = optionsFromAnnotatedField
      .merge(firefoxOptions);
origin: vmi/selenese-runner-java

@Override
public WebDriver newInstance(DriverOptions driverOptions) {
  GeckoDriverService service = setupBuilder(new GeckoDriverService.Builder(), driverOptions, GECKODRIVER).build();
  FirefoxOptions firefoxOptions = newFirefoxOptions(driverOptions);
  String firefoxBin = getFirefoxBinary(driverOptions);
  if (firefoxBin != null)
    firefoxOptions.setBinary(firefoxBin);
  if (driverOptions.has(CLI_ARGS))
    firefoxOptions.addArguments(driverOptions.getCliArgs());
  FirefoxProfile profile = getFirefoxProfile(driverOptions);
  if (profile != null)
    firefoxOptions.setProfile(profile);
  firefoxOptions.merge(driverOptions.getCapabilities());
  FirefoxDriver driver = new FirefoxDriver(service, firefoxOptions);
  setInitialWindowSize(driver, driverOptions);
  return driver;
}
org.openqa.selenium.firefoxFirefoxOptionsmerge

Popular methods of FirefoxOptions

  • <init>
  • setProfile
  • setHeadless
  • addArguments
  • setBinary
  • addPreference
  • setCapability
  • setLogLevel
  • setAcceptInsecureCerts
  • getProfile
  • setLegacy
  • setProxy
  • setLegacy,
  • setProxy,
  • SetLoggingPreference,
  • getBinary,
  • getBinaryOrNull,
  • getBrowserName,
  • isLegacy,
  • setUnhandledPromptBehaviour,
  • toString

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • getExternalFilesDir (Context)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now