Skip to content

Instantly share code, notes, and snippets.

Created January 4, 2012 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1560299 to your computer and use it in GitHub Desktop.
Save anonymous/1560299 to your computer and use it in GitHub Desktop.
Testcase to reproduce FirefoxDriver Issues in Selenium WebDriver
Netscape.cfg/AutoConfig fehlgeschlagen. Bitte kontaktieren Sie Ihren System-Administrator.
Fehler: pref fehlgeschlagen: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.setBoolPref]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: prefcalls.js :: pref :: line 70" data: no]
import org.openqa.selenium.Platform;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
public class SeleniumTest {
public static void main(String[] args)
{
RemoteWebDriver driver = null;
DesiredCapabilities capabilities = new DesiredCapabilities();
// Browser name doesn't work when camel case is used
capabilities.setBrowserName("firefox");
capabilities.setVersion("8");
capabilities.setPlatform(Platform.valueOf("WINDOWS"));
capabilities.setJavascriptEnabled(true);
capabilities.setCapability(FirefoxDriver.PROFILE, new FirefoxProfile());
driver = new FirefoxDriver(capabilities);
driver.get("http://www.google.com");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment