在Mac OS X上运行selenium:找不到驱动程序类:com.opera.core.systems.OperaDriver

时间:2016-07-06 18:09:04

标签: selenium

尝试在Mac OS X上运行Selenium时获得以下信息:

19:07:48.618 INFO - Launching a standalone Selenium Server
19:07:48.653 INFO - Java: Oracle Corporation 25.91-b14
19:07:48.654 INFO - OS: Mac OS X 10.10.5 x86_64
19:07:48.665 INFO - v2.49.0, with Core v2.49.0. Built from revision 365eeb4
19:07:48.734 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform MAC
19:07:48.735 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform MAC
19:07:48.735 INFO - Driver class not found: com.opera.core.systems.OperaDriver
19:07:48.735 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
19:07:48.812 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
19:07:48.812 INFO - Selenium Server is up and running

运行phpunit时,我得到:

PHPUnit_Extensions_Selenium2TestCase_WebDriverException: The best matching driver provider org.openqa.selenium.safari.SafariDriver can't create a new driver instance for Capabilities [{browserName=*firefox}]
Build info: version: '2.49.0', revision: '365eeb4', time: '2016-01-13 18:37:00'
System info: host: 'Sebastians-Mac-Pro.local', ip: '192.168.13.13', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.5', java.version: '1.8.0_91'
Driver info: driver.version: unknown

更新

这是我在测试文件中的内容:

public function setUp()
{
    parent::setUp();

    $this->setBrowser("*firefox");
    $this->setBrowserUrl("http://auth.local");
}

public function testMyTestCase()
{
    $this->open("/");
    $this->type("email", "dummy@email.com");
    $this->type("password", "secret");
    $this->click("LOGIN");
    $this->waitForPageToLoad("30000");
    $this->assertTrue($this->isTextPresent("Some result"));
}

知道怎么解决吗?

0 个答案:

没有答案