未找到驱动程序类:com.opera.core.systems.OperaDriver

时间:2015-12-29 18:26:42

标签: selenium-grid

尝试将节点分配给Selenium Grid时获得以下异常。此节点未显示在网格控制台中。知道为什么我会得到这个例外吗?

java -jar selenium-server-standalone-2.48.2.jar -port 5555 -role node -hub http://localhost:4444/grid/register
:10:41.671 INFO - Launching a Selenium Grid node
:10:43.169 INFO - OS: Windows 7 6.1 amd64
:10:43.174 INFO - v2.48.0, with Core v2.48.0. Built from revision 41bccdd
:10:43.232 INFO - Driver class not found: com.opera.core.systems.OperaDriver
:10:43.232 INFO - Driver provider com.opera.core.systems.OperaDriver is not r
stered
:10:43.262 INFO - Selenium Grid node is up and ready to register to the hub
:10:43.285 INFO - Starting auto registration thread. Will try to register eve
5000 ms.
:10:43.285 INFO - Registering the node to the hub: http://localhost:4444/grid
gister
:10:43.296 INFO - The node is registered to the hub and ready to use
:10:53.760 INFO - The node is registered to the hub and ready to use

1 个答案:

答案 0 :(得分:0)

首先,我会选择Safari而不是Opera。其次,确保Selenium Safari和Opera驱动程序显示在您的依赖项中。你可以这样明确地定义它:

<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-safari-driver</artifactId>
    <version>2.48.2</version>
</dependency>

但是,您基本上需要做的是配置Grid节点,并调整Mac。这是我对配置的猜测。你需要调整它。:

{
    "capabilities" : [{
            "browserName" : "firefox",
            "acceptSslCerts" : true,
            "javascriptEnabled" : true,
            "takesScreenshot" : false,
            "firefox_profile" : "",
            "browser-version" : "42",
            "platform" : "MAC",
            "maxInstances" : 5,
            "firefox_binary" : "",
            "cleanSession" : true
        }, {
            "browserName" : "chrome",
            "maxInstances" : 5,
            "platform" : "MAC",
            "webdriver.chrome.driver" : "/Applications/Opera.app/Contents/MacOS/Chrome/chrome"
        }, {
            "browserName" : "safari",
            "maxInstances" : 1,
            "platform" : "MAC",
            "version" : "12",
            "webdriver.safari.driver" : "
https://code.google.com/p/selenium/wiki/OperaDriver 
http://selenium-release.storage.googleapis.com/2.48/SafariDriver.safariextz"
        }, {
            "browserName" : "opera",
            "maxInstances" : 1,
            "platform" : "MAC",
            "version" : "8",
            "webdriver.opera.driver" : "???"
        }
    ],
    "configuration" : {
        "_comment" : "Configuration for Node",
        "cleanUpCycle" : 2000,
        "timeout" : 30000,
        "proxy" : "org.openqa.grid.selenium.proxy.WebDriverRemoteProxy",
        "port" : 5555,
        "host" : ip,
        "register" : true,
        "hubPort" : 4444,
        "maxSessions" : 5
    }
}