Selenium grid with Chrome driver (WebDriverException: The path to the driver executable must be set by the webdriver.chrome.driver system property)

前端 未结 6 771
孤城傲影
孤城傲影 2020-12-14 13:09

I am trying to get my Selenium Grid running on Chrome driver.

At first I started hub and node: java -jar selenium-server-standalone-2.45.0.jar -role hub java -jar se

6条回答
  •  感情败类
    2020-12-14 13:50

    I could run chrome and firefox remotely using selenium grid when I added both properties in json config file like this way here: notice the last two lines

    {
      "capabilities":
      [
        {
          "browserName": "firefox",
          "marionette": true,
          "maxInstances": 5,
          "seleniumProtocol": "WebDriver"
        },
        {
          "browserName": "chrome",
          "maxInstances": 5,
          "seleniumProtocol": "WebDriver"
        },
        {
          "browserName": "internet explorer",
          "platform": "WINDOWS",
          "maxInstances": 1,
          "seleniumProtocol": "WebDriver"
        },
        {
          "browserName": "safari",
          "technologyPreview": false,
          "platform": "MAC",
          "maxInstances": 1,
          "seleniumProtocol": "WebDriver"
        }
      ],
      "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
      "maxSession": 5,
      "port": -1,
      "register": true,
      "registerCycle": 5000,
      "hub": "http://192.168.1.2:4444",
      "nodeStatusCheckTimeout": 5000,
      "nodePolling": 5000,
      "role": "node",
      "unregisterIfStillDownAfter": 60000,
      "downPollingLimit": 2,
      "debug": false,
      "servlets" : [],
      "withoutServlets": [],
      "custom": {},
      "webdriver.gecko.driver":"c:/drivers/geckodriver.exe",
      "webdriver.chrome.driver":"c:/drivers/chromedriver.exe"
    }
    

提交回复
热议问题