Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome opens with "Data;" with selenium

I am a newbie to Selenium and trying to open localhost:3000 page 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 a "data;" . The chrome version is 50.0.2661.94

Any idea what is the exact issue?

like image 211
learntogrow-growtolearn Avatar asked May 11 '16 10:05

learntogrow-growtolearn


2 Answers

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.

like image 137
Gideon Pyzer Avatar answered Sep 19 '22 17:09

Gideon Pyzer


I was also getting the same issue. I updated ChromeDriver to the latest version and that fixed it.

like image 40
Pulkit Agrawal Avatar answered Sep 22 '22 17:09

Pulkit Agrawal