0

I am using Mozilla 51.0.1 and Eclipse Lunar 3.0.1. When I am trying to run my code I am not able to get URL in the browser, it just opens.

package SessionPack;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class SessionCalss {

    public static void main(String arg[])
    {
        System.out.println("String"); 

        WebDriver driver;

        System.setProperty("webdriver.gecko.driver", "C:\\New folder\\geckodriver.exe");
        driver=new FirefoxDriver(); 

         driver.get("www.gooogle.com");

    }
}
2
  • what's in console? Commented May 12, 2017 at 2:01
  • What is the Selenium and Gecko version that you are using? And what's the error message that you are getting? Commented May 12, 2017 at 2:46

2 Answers 2

2

Your request is wrong in two places:

  1. You write extra character "o" - gooogle
  2. You have to added https:// before URL-adress - https://www.google.com

After fix this code will be work.

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

Comments

0

You have to specify http:// or https:// specifically; you have to change your URL string from:

 www.gooogle.com to https://www.gooogle.com

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.