2

I want to automate some GUI tasks using Selenium.
And integrate this task in my automation suite written in Java.
Being totally new to selenium, I did some research on the same.
So what I'm configured is this:-

  • Selenium IDE 1.1.0
  • Selenium Server 2.3.0
  • Selenium client driver (for java) 2.3.0
  • Linked client diver and server jar in my Eclipse project
  • used selenium IDE to capture a sample task (this needs to be repeated my times depending upon some inputs, which is what I'm trying to automate) and export this as Junit4 (Webdriver)

Now while running this as Junit test from Eclipse I get the following error

org.openqa.selenium.WebDriverException: Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI)

This looked like some problem with the URL but I'm not sure what.
These are parts of the relevant code

private WebDriver driver;
private String baseUrl="https://172.25.18.53:9443";  //IS THIS CORRECT ??
driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);


driver.get("/");
driver.findElement(By.name("Username")).clear();
driver.findElement(By.name("Username")).sendKeys("admin");
driver.findElement(By.name("Password")).clear();
driver.findElement(By.name("Password")).sendKeys("asdf1234");
driver.findElement(By.name("UserLoginButton")).click();
driver.findElement(By.linkText("Security")).click();
driver.findElement(By.linkText("Token Vaults")).click();
// SO ON ...

Any pointers what could be the issue here ?

To add to the above:

  • When I run this test Firefox is launched but with an empty URL and nothing occurs.
  • Interesting to note that variable baseUrl was empty (and used nowhere in the code) when I exported the code from Selenium IDE. So I manually updated this variable hoping that maybe this would fix the error but to no avail.

1 Answer 1

2

you are supposed to put the address on the get method:

driver.get("https://172.25.18.53:9443");

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.