-jar selenium-server-standalone-2.41.0.jar -Dwebdriver.chrome.driver=C:\Webdriver\chromedriver.exepublic class TestClass {
public static void main(String[] args) {
// Setup du test - création du driver avec les capacités nécessaires
DesiredCapabilities desiredCapabilities = DesiredCapabilities.chrome();
desiredCapabilities.setPlatform(Platform.WINDOWS);
try{
WebDriver driver = new RemoteWebDriver(new URL("http://127.0.0.1:4444/wd/hub"), desiredCapabilities);
doTest(driver, "http://testserver");
driver.quit();
}
catch(MalformedURLException e){}
}
public static void doTest(WebDriver driver, String baseUrl)
{
driver.get(baseUrl + "/testpage.jsp");
driver.findElement(By.id("h_1234395479221o3")).click();
driver.findElement(By.name("t_n1216757067133")).click();
}
}14:52:45.143 INFO - Executing: [new session: Capabilities [{browserName=chrome}]] at URL: /session)
14:52:45.162 INFO - Creating a new session for Capabilities [{browserName=chrome}]
Starting ChromeDriver (v2.10.267521) on port 33609
Only local connections are allowed.
Port not available. Exiting...mai 14, 2014 8:41:41 AM org.openqa.grid.selenium.GridLauncher main
Infos: Launching a standalone server
Setting system property webdriver.chrome.driver to C:\Webdriver\chromedriver.exe
Setting system property webdriver.ie.driver to C:\Webdriver\IEDriverServer.exe
08:41:41.510 INFO - Java: Oracle Corporation 24.51-b03
08:41:41.511 INFO - OS: Windows 8 6.2 amd64
08:41:41.542 INFO - v2.41.0, with Core v2.41.0. Built from revision 3192d8a
08:41:42.120 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
08:41:42.122 INFO - Version Jetty/5.1.x
08:41:42.123 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
08:41:42.124 INFO - Started HttpContext[/selenium-server,/selenium-server]
08:41:42.124 INFO - Started HttpContext[/,/]
08:41:42.174 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@5f192118
08:41:42.175 INFO - Started HttpContext[/wd,/wd]
08:41:42.180 INFO - Started SocketListener on 0.0.0.0:4444
08:41:42.180 INFO - Started org.openqa.jetty.jetty.Server@4c7d5d85
08:41:59.595 INFO - Executing: [new session: Capabilities [{platform=WINDOWS, browserName=chrome, version=}]] at URL: /session)
08:41:59.615 INFO - Creating a new session for Capabilities [{platform=WINDOWS, browserName=chrome, version=}]
Starting ChromeDriver (v2.10.267521) on port 9348
Only local connections are allowed.
Port not available. Exiting...I didn't get that working, but there is a webdriver.chrome.args property you can set in java. This property is used to set the command line arguments.
The line should look like this:
DesiredCapabilities capabilities.setCapability("webdriver.chrome.args", Arrays.asList("--whitelisted-ips=127.0.0.1"));
> --
> You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/ZQ38CxvWN2w/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
> To post to this group, send email to seleniu...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/cc81b937-4f05-486b-929d-84997e71b159%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.