0

I am trying to run script to another vm but it give me following error message.

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'BDQCC3', ip: '10.132.48.16', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_151'
Driver info: driver.version: unknown"

MY code is

public static void main(String[] args) throws MalformedURLException 
 {
    // TODO Auto-generated method stub
    WebDriver driver;
    DesiredCapabilities capabilities = DesiredCapabilities.chrome();
    capabilities.setBrowserName("chrome");
    capabilities.setPlatform(Platform.WIN10);
    driver = new RemoteWebDriver(new URL("http://10.132.48.16:5566/wd/hub"), capabilities);
    driver.get("http://google.com");
    System.out.println(driver.getTitle());  
 }
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Dhrumil Pathak
  • 101
  • 3
  • 11
  • Possible duplicate of [Exception "Was passed main parameter 'webdriver' but no main parameter was defined Error while creating note](https://stackoverflow.com/questions/48097238/exception-was-passed-main-parameter-webdriver-but-no-main-parameter-was-defin) – undetected Selenium Jan 05 '18 at 15:42

1 Answers1

0

Seems the command executed on grid node (10.132.48.16) to register to grid hub(10.132.48.16) is not correct. I doubt the command missed the option: -Dwebdriver.chrome.driver= to sepecify the path of chromedriver.

Register commmand example:

java -jar %~dp0\selenium-server-standalone-2.45.0.jar -role node -nodeConfig node.json -Dwebdriver.chrome.driver=%~dp0\chromedriver.exe

login to the grid node 10.132.48.16, stop the register process and check the register command is correct, also please put the command at here to help us to resovle the problem.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
yong
  • 13,357
  • 1
  • 16
  • 27