Trường hợp thử nghiệm Selenium trả về quy trình đã hoàn tất với mã thoát 0

Tôi đã cài đặt phpunit trên windows và đã coppied chương trình mẫu. Thay đổi url thành google.com

<?php
require_once 'PHPUnit/Autoload.php';
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';

class WebTest extends PHPUnit_Extensions_SeleniumTestCase
{
    protected function setUp()
    {
        $this->setBrowser('*firefox');
        $this->setBrowserUrl('http://www.google.com/');
    }

    public function testTitle()
    {
        $this->open('http://www.google.com/');
        $this->assertTitleEquals('Example Web Page');
    }
}
?>

Chum seleinum đang chạy:

20:37:24.855 INFO - Java: Sun Microsystems Inc. 20.0-b11
20:37:24.918 INFO - OS: Windows 7 6.1 x86
20:37:25.042 INFO - v2.0 [rc2], with Core v2.0 [rc2]
20:37:27.554 INFO - RemoteWebDriver instances should connect to: http://127.0.0.
1:4444/wd/hub
20:37:27.570 INFO - Version Jetty/5.1.x
20:37:27.585 INFO - Started HttpContext[/selenium-server/driver,/selenium-server
/driver]
20:37:27.601 INFO - Started HttpContext[/selenium-server,/selenium-server]
20:37:27.601 INFO - Started HttpContext[/,/]
20:37:27.913 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@a981ca

20:37:27.913 INFO - Started HttpContext[/wd,/wd]
20:37:27.960 INFO - Started SocketListener on 0.0.0.0:4444
20:37:27.991 INFO - Started org.openqa.jetty.jetty.Server@1c29ab2

Khi tôi chạy mã từ dòng lệnh, tôi nhận được Quá trình hoàn tất với mã thoát 0

6
задан Will 9 June 2011 в 08:40
поделиться