congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
FirefoxOptions.addArguments
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.seleniumhq.selenium/selenium-firefox-driver

void amendOptions(FirefoxOptions options) {
 options.addArguments(extraOptions);
}
origin: org.seleniumhq.selenium/selenium-firefox-driver

public FirefoxOptions addArguments(String... arguments) {
 addArguments(ImmutableList.copyOf(arguments));
 return this;
}
origin: com.infotel.seleniumRobot/core

@Override
protected MutableCapabilities getDriverOptions() {
  FirefoxOptions options = new FirefoxOptions();
  
  if (webDriverConfig.isHeadlessBrowser()) {
    logger.info("setting firefox in headless mode. Supported for firefox version >= 56");
    options.addArguments("-headless");
    options.addArguments("--window-size=1280,1024");
    options.addArguments("--width=1280");
    options.addArguments("--height=1024");
  }
  FirefoxProfile profile = getFirefoxProfile(webDriverConfig);
  configProfile(profile, webDriverConfig);
  options.setCapability(FirefoxDriver.PROFILE, profile);
  options.setLogLevel(FirefoxDriverLogLevel.ERROR);
  
  if (webDriverConfig.isDevMode()) {
    options.setLogLevel(FirefoxDriverLogLevel.TRACE);
  }
  
  // handle https://bugzilla.mozilla.org/show_bug.cgi?id=1429338#c4 and https://github.com/mozilla/geckodriver/issues/789
  options.setCapability("moz:useNonSpecCompliantPointerOrigin", true);
  return options;
}
 
origin: org.seleniumhq.selenium/selenium-firefox-driver

FirefoxOptions that = (FirefoxOptions) raw;
addArguments(that.args);
that.booleanPrefs.forEach(this::addPreference);
that.intPrefs.forEach(this::addPreference);
 Object value = that.get("args");
 if (value instanceof String) {
  addArguments((String) that.get("args"));
 } else if (value instanceof List<?>) {
  addArguments((List<String>) that.get("args"));
 } else {
  addArguments(that.get("args").toString());
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: net.jangaroo/jangaroo-maven-plugin

private WebDriver createWebDriver(DriverManagerType driverManagerType) throws IllegalArgumentException, WebDriverManagerException {
 switch (driverManagerType) {
  case CHROME:
   ChromeOptions chromeOptions = new ChromeOptions();
   chromeOptions.setHeadless(true);
   chromeOptions.addArguments(jooUnitWebDriverBrowserArguments);
   getLog().info("Starting Chrome with " + jooUnitWebDriverBrowserArguments.size() + " arguments: " + String.join(" ", jooUnitWebDriverBrowserArguments));
   return new ChromeDriver(chromeOptions);
  case FIREFOX:
   FirefoxOptions firefoxOptions = new FirefoxOptions();
   firefoxOptions.setHeadless(true);
   firefoxOptions.addArguments(jooUnitWebDriverBrowserArguments);
   getLog().info("Starting Firefox with " + jooUnitWebDriverBrowserArguments.size() + " arguments: " + String.join(" ", jooUnitWebDriverBrowserArguments));
   return new FirefoxDriver(firefoxOptions);
  case EDGE:
   return new EdgeDriver(); // no headless mode and no arguments yet :-(
  case IEXPLORER:
   return new InternetExplorerDriver(); // no headless mode and no arguments yet :-(
  case OPERA:
   return new OperaDriver(); // no headless mode and no arguments yet :-(
 }
 throw new IllegalArgumentException();
}
origin: selenium-cucumber/selenium-cucumber-java

options.addArguments("-headless", "-safe-mode");
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;
}
origin: de.otto/jlineup-core

FirefoxOptions options = new FirefoxOptions();
options.setProfile(getFirefoxProfileWithDisabledAnimatedGifs());
options.addArguments(runStepConfig.getFirefoxParameters());
if (jobConfig.browser.isHeadless()) {
  options.setHeadless(true);
  options.addArguments("-width", width + "", "-height", jobConfig.windowHeight + "");
origin: org.bitbucket.iamkenos/cissnei-selenium

options.addArguments(format("user-data-dir=%s", drCustomProfileDir));
origin: webrtc/KITE

firefoxOptions.setProfile(firefoxProfile);
if (browser.isHeadless()) {
 firefoxOptions.addArguments("-headless");
 firefoxOptions.addArguments(flag);
org.openqa.selenium.firefoxFirefoxOptionsaddArguments

Popular methods of FirefoxOptions

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

Popular in Java

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • compareTo (BigDecimal)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JTextField (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now