首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找不到驱动程序类: com.opera.core.systems.OperaDriver

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

Stack Overflow用户
提问于 2015-12-30 02:26:42
回答 1查看 3.6K关注 0票数 1

尝试将节点分配给Selenium Grid时出现以下异常。并且此节点不会显示在网格控制台中。你知道为什么我会得到这个异常吗?

代码语言:javascript
复制
java -jar selenium-server-standalone-2.48.2.jar -port 5555 -role node -hub http://localhost:4444/grid/register
代码语言:javascript
复制
: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
EN

回答 1

Stack Overflow用户

发布于 2016-01-06 05:48:50

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

代码语言:javascript
复制
<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-safari-driver</artifactId>
    <version>2.48.2</version>
</dependency>

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

代码语言:javascript
复制
{
    "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
    }
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34516814

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档