Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
2 views
in DevOps and Agile by (19.7k points)

I am a newbie to Selenium and trying to open localhost:3000 pages from Chrome via selenium driver. The code is :

import com.google.common.base.Function;

import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebDriverException;

import org.openqa.selenium.chrome.ChromeDriver;

import org.openqa.selenium.firefox.FirefoxDriver;

import org.openqa.selenium.firefox.FirefoxDriver;

public class SeleniumTests {

    public static void main(String[] args) {

        System.setProperty("webdriver.chrome.driver", "C://chromedriver_win32//chromedriver.exe");

        WebDriver driver = new ChromeDriver();              

        driver.get("localhost:3000");

    }

}

However, this opens my chrome window with "data;". The chrome version is 50.0.2661.94

Any idea what is the exact issue?

1 Answer

0 votes
by (62.9k points)

Specify the protocol you are using, so instead of localhost:3000, use http://localhost:3000. If that doesn't help, see the comment here on the Chromium issue tracker.

Hope this helps!

If you are interested to learn Selenium on a much deeper level and want to become a professional in the testing domain, check out Intellipaat’s Selenium certification!

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.5k questions

32.5k answers

500 comments

108k users

Browse Categories

...