Package org.openqa.selenium.firefox

Examples of org.openqa.selenium.firefox.PreferencesWrapper


      else {
        profile = new FirefoxProfile();
      }

      if (customProfilePreferencesFile != null) {
        PreferencesWrapper prefs = loadFirefoxPreferences();

        prefs.addTo(profile);
        try {
          StringWriter writer = new StringWriter(512);
          prefs.writeTo(writer);
          LOG.info("Added properties to firefox profile: " + writer.toString());
        } catch (IOException e) {
          LOG.error("Unable to log firefox profile settings", e);
        }
      }
View Full Code Here


    }
    return driver;
  }

  private PreferencesWrapper loadFirefoxPreferences() {
    PreferencesWrapper prefs;
    FileReader reader;
    try {
      reader = new FileReader(customProfilePreferencesFile);
    } catch (FileNotFoundException e) {
      throw new RuntimeException(e);
    }
    try {
      prefs = new PreferencesWrapper(reader);
    } finally {
      try {
        reader.close();
      } catch (IOException e) {
        LOG.error("Unable to close firefox profile settings file", e);
View Full Code Here

TOP

Related Classes of org.openqa.selenium.firefox.PreferencesWrapper

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.