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?
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.
I was also getting the same issue. I updated ChromeDriver to the latest version and that fixed it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With