Created
January 4, 2012 14:36
-
-
Save anonymous/1560299 to your computer and use it in GitHub Desktop.
Testcase to reproduce FirefoxDriver Issues in Selenium WebDriver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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