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;
imp
If you're using Codeception, start the test with :
$I->amOnPage('/');
You need to add two things to run :
First - you should use http://localhost:3000
Second - You must use debug port before creating webDriver as : options.addArguments("--remote-debugging-port=9225");
Whole Code:
WebDriverManager.chromedriver().setup();
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("useAutomationExtension", false);
options.addArguments("--remote-debugging-port=9225");
WebDriver driver = new ChromeDriver(options);
Drop comments if you have any query
I've been running in a similar situation, the fix in my case was simply to upgrade chrome webdriver to its latest version (in my case V2.27).
The cause of showing Data;
instead of the real application URL was that:
WebDriver driver = new RemoteWebDriver(new URL("http://<host>:<port>/wd/hub"), desiredCapabilities);
failed to get created. Instead, driver
object was holding a null
value.
So after chrome driver upgrade , it had been created correctly and problem solved.
Hope this helps who's still stuck!
Make sure you are using latest release of ChromeDriver (as for now it's 2.28). I had same problem with data:,
. By mistake I've downloaded old version and got the issue with specified URL not being opened, just data:,
just replace the "chromedriver.exe" with latest release of ChromeDriver.
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.