Selenium网格中的Opera浏览器:未找到驱动程序类

Selenium网格中的Opera浏览器:未找到驱动程序类,selenium,selenium-webdriver,selenium-grid,Selenium,Selenium Webdriver,Selenium Grid,我正在尝试使用Selenium grid设置一个环境,以便在远程机器上执行Selenium测试。我唯一不能去上班的浏览器是Opera。我对它的配置与其他浏览器相同。但是,当我启动节点时,它显示未找到驱动程序类 我在主机上运行64位windows 8.1 Enterprise 节点和主机位于windows 7 Enterprise 32位service pack 1上 在安装了opera的主机上,opera webdriver位于C:/GUI Tests/Drivers/operadriver.e

我正在尝试使用Selenium grid设置一个环境,以便在远程机器上执行Selenium测试。我唯一不能去上班的浏览器是Opera。我对它的配置与其他浏览器相同。但是,当我启动节点时,它显示未找到驱动程序类

我在主机上运行64位windows 8.1 Enterprise

节点和主机位于windows 7 Enterprise 32位service pack 1上

在安装了opera的主机上,opera webdriver位于C:/GUI Tests/Drivers/operadriver.exe中,我尝试了32位webdriver和64位webdriver,但仍然遇到错误:

13:30:37.169 INFO - Driver class not found: com.opera.core.systems.OperaDriver
13:30:37.169 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped: Unable to create new instances on this machine.
13:30:37.178 INFO - Driver class not found: com.opera.core.systems.OperaDriver
13:30:37.178 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
如果有人知道这个问题,请帮助我


关于我的环境的额外信息 启动集线器:

java -jar selenium-server-standalone-3.3.1.jar -role hub -hubConfig hubConfig.json
我的集线器配置:

{
  "host": ip,
  "maxSessions": 5,
  "port": 4444,
  "cleanupCycle": 5000,
  "timeout": 300000,
  "newSessionWaitTimeout": -1,
  "servlets": [],
  "prioritizer": null,
  "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
  "throwOnCapabilityNotPresent": true,
  "nodePolling": 180000,
  "platform": "WINDOWS"
}
正在启动节点:

java -jar selenium-server-standalone-3.3.1.jar -role node -nodeConfig nodeConfig.json
我的节点配置文件:

{
  "capabilities":
  [
    {
      "browserName": "opera",
      "platform": "WINDOWS",
      "maxInstances": 5,
      "seleniumProtocol": "WebDriver",
      "webdriver.opera.driver": "C:/GUI-Tests/Drivers/operadriver.exe"
    }
  ],
  "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
  "maxSession": 1,
  "port": 5555,
  "register": true,
  "registerCycle": 5000,
  "hub": "http://localhost:4444",
  "nodeStatusCheckTimeout": 5000,
  "nodePolling": 5000,
  "role": "node",
  "unregisterIfStillDownAfter": 60000,
  "downPollingLimit": 2,
  "debug": false,
  "servlets" : [],
  "withoutServlets": [],
  "custom": {}
}
驱动程序位置的屏幕截图:
回答我自己的问题,因为我发现了答案,我希望能帮助谷歌搜索这个问题的每个人:)

事实证明opera驱动程序是一个遗留驱动程序,您不需要它

您确实需要Opera浏览器和。在c#中,将您的能力定义为:

capabilities = new DesiredCapabilities();
capabilities.SetCapability(CapabilityType.BrowserName, "operablink");
capabilities.Platform = new Platform(PlatformType.Windows);
_webDriver = new RemoteWebDriver(_gridServerUri, capabilities);
在您的节点上:

{
  "capabilities":
  [
    {
      "browserName": "operablink",
      "platform": "WINDOWS",
      "maxInstances": 5,
      "seleniumProtocol": "WebDriver"
    }
  ],
  "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
  "maxSession": 1,
  "port": 5555,
  "register": true,
  "registerCycle": 5000,
  "hub": "http://localhost:4444",
  "nodeStatusCheckTimeout": 5000,
  "nodePolling": 5000,
  "role": "node",
  "unregisterIfStillDownAfter": 60000,
  "downPollingLimit": 2,
  "debug": false,
  "servlets" : [],
  "withoutServlets": [],
  "custom": {}
}
我希望这对某人有用,至少对我有用

注:
  • operachromiumdriver在我的路径变量中
  • 我的节点和集线器正在运行Windows 7

    • 回答我自己的问题,因为我发现了答案,我希望能帮助谷歌搜索这个问题的每个人:)

      事实证明opera驱动程序是一个遗留驱动程序,您不需要它

      您确实需要Opera浏览器和。在c#中,将您的能力定义为:

      capabilities = new DesiredCapabilities();
      capabilities.SetCapability(CapabilityType.BrowserName, "operablink");
      capabilities.Platform = new Platform(PlatformType.Windows);
      _webDriver = new RemoteWebDriver(_gridServerUri, capabilities);
      
      在您的节点上:

      {
        "capabilities":
        [
          {
            "browserName": "operablink",
            "platform": "WINDOWS",
            "maxInstances": 5,
            "seleniumProtocol": "WebDriver"
          }
        ],
        "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
        "maxSession": 1,
        "port": 5555,
        "register": true,
        "registerCycle": 5000,
        "hub": "http://localhost:4444",
        "nodeStatusCheckTimeout": 5000,
        "nodePolling": 5000,
        "role": "node",
        "unregisterIfStillDownAfter": 60000,
        "downPollingLimit": 2,
        "debug": false,
        "servlets" : [],
        "withoutServlets": [],
        "custom": {}
      }
      
      我希望这对某人有用,至少对我有用

      注:
      • operachromiumdriver在我的路径变量中
      • 我的节点和集线器正在运行Windows 7

      好家伙,这帮了我的忙。我只使用了browserName:'opera',它不起作用,但有了您的功能,它对我也起作用。对我来说,问题中的节点配置工作得很好。我唯一改变的是,我删除了代理密钥,并将对驱动程序的传递设置为“operadriver.exe”,没有任何前缀pass。然后在我的测试目录中创建了命令提示符的快捷方式,并创建了/k开关来启动节点
      /k java-jar selenium.jar-role node-nodeConfig nodeConfig.json
      这对我很有帮助。我只使用了browserName:'opera',它不起作用,但有了您的功能,它对我也起作用。对我来说,问题中的节点配置工作得很好。我唯一改变的是,我删除了代理密钥,并将对驱动程序的传递设置为“operadriver.exe”,没有任何前缀pass。然后在我的测试目录中创建命令提示符的快捷方式,并创建/k开关以启动节点
      /k java-jar selenium.jar-role节点-nodeConfig nodeConfig.json