Package org.openqa.selenium.chrome

Examples of org.openqa.selenium.chrome.ChromeOptions


  private EmbeddedBrowser newChromeBrowser(ImmutableSortedSet<String> filterAttributes,
          long crawlWaitReload, long crawlWaitEvent) {
    ChromeDriver driverChrome;
    if (configuration.getProxyConfiguration() != null
            && configuration.getProxyConfiguration().getType() != ProxyType.NOTHING) {
      ChromeOptions optionsChrome = new ChromeOptions();
      String lang = configuration.getBrowserConfig().getLangOrNull();
      if (!Strings.isNullOrEmpty(lang)) {
        optionsChrome.setExperimentalOptions("intl.accept_languages", lang);
      }
      optionsChrome.addArguments("--proxy-server=http://"
              + configuration.getProxyConfiguration().getHostname() + ":"
              + configuration.getProxyConfiguration().getPort());
      driverChrome = new ChromeDriver(optionsChrome);
    } else {
      driverChrome = new ChromeDriver();
View Full Code Here


    return webDriver;
  }

  protected WebDriver createChromeDriver() {
    DesiredCapabilities capabilities = createCommonCapabilities();
    ChromeOptions options = new ChromeOptions();
    options.addArguments("test-type");
    capabilities.setCapability(ChromeOptions.CAPABILITY, options);
    return new ChromeDriver(capabilities);
  }
View Full Code Here

        capabilities.setCapability("chrome.switches", chromeSwitches);
        return capabilities;
    }

    private ChromeOptions optionsFromSwitches(String chromeSwitches) {
        ChromeOptions options = new ChromeOptions();
        options.addArguments("test-type");
        if (StringUtils.isNotEmpty(chromeSwitches)) {
            List<String> arguments = new OptionsSplitter().split(chromeSwitches);
            options.addArguments(arguments);
        }
        return options;
    }
View Full Code Here

    }
    return wrapper;
  }

  protected WebDriver createChromeDriver() {
    ChromeOptions options = new ChromeOptions();
    if (startMaximized) {
      // Due do bug in ChromeDriver we need this workaround
      // http://stackoverflow.com/questions/3189430/how-do-i-maximize-the-browser-window-using-webdriver-selenium-2
      options.addArguments("chrome.switches", "--start-maximized");
    }
    return new ChromeDriver(options);
  }
View Full Code Here

  private static WebDriver createDriver() {
    if (remote != null) {
      return createRemoteDriver(remote, browser);
    }
    else if (CHROME.equalsIgnoreCase(browser)) {
      ChromeOptions options = new ChromeOptions();
      if (startMaximized) {
        // Due do bug in ChromeDriver we need this workaround
        // http://stackoverflow.com/questions/3189430/how-do-i-maximize-the-browser-window-using-webdriver-selenium-2
        options.addArguments("chrome.switches", "--start-maximized");
      }
      return new ChromeDriver(options);
    }
    else if (ie()) {
      DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();
View Full Code Here

  private static WebDriver createDriver() {
    if (remote != null) {
      return createRemoteDriver(remote, browser);
    }
    else if (CHROME.equalsIgnoreCase(browser)) {
      ChromeOptions options = new ChromeOptions();
      if (startMaximized) {
        // Due do bug in ChromeDriver we need this workaround
        // http://stackoverflow.com/questions/3189430/how-do-i-maximize-the-browser-window-using-webdriver-selenium-2
        options.addArguments("chrome.switches", "--start-maximized");
      }
      return new ChromeDriver(options);
    }
    else if (ie()) {
      return maximize(new InternetExplorerDriver());
View Full Code Here

TOP

Related Classes of org.openqa.selenium.chrome.ChromeOptions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.