WebDriverException: Component returned failure code: 0x804b000a

There is no secret that the start of something new is often difficult. Therefore, if you are on this page, I guess you are new to WebDriver or as it is also known Selenium 2.0

org.openqa.selenium.WebDriverException: Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService.newURI]

This message from a stack trace is likely the result of incorrect input argument in the driver’s method .get() or .navigate().to()

In order to verify why your webDriver doesn’t open an URL, let’s examine the code snippet. Below you can find some examples which might be a reason of this exception:

driver.get("www.fruzenshtein.com");
driver.get("fruzenshtein.com");
driver.navigate().to("fruzenshtein.com");
driver.navigate().to("www.fruzenshtein.com");

Notice that all URLs are without http:// – this is the main reason of the exception. In order to fix the problem you just need to add http:// before all addresses.

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS