Selenium服务器没有响应

时间:2013-04-14 11:36:58

标签: php selenium phpunit

我的设置是这样的:

  1. 最新的Selenium服务器
  2. 最新的Phpunit和Selenium插件
  3. Firefox 3.6(即使没有Selenium IDE安装也没有插件)
  4. 好吧最后我的代码是这样的:

    <?php
    class TestLogin extends PHPUnit_Extensions_Selenium2TestCase
    {
        public function setUp()
        {
            $this->setHost('localhost');
            $this->setPort(4444);
            $this->setBrowser('firefox');
            $this->setBrowserUrl('http://localhost');
            $this->prepareSession();
            $this->url('http://localhost');
        }
    
        public function testSignupFormFor()
        {
             $this->url('http://localhost/ci/index.php/signup/signupController/signup');
    
             $div = $this->byCssSelector('div#signupFormId');
             $form =$this->byCssSelector('div#signupFormId>form');
             $userObj = $this->byName("userName");
    
             $userName = $userObj->value('root');   -----> Server hangs here
    
             $this->assertEquals('root',$userName);
    ?>
    

    当我用phpunit filename.php运行代码时, 然后它打开firefox并挂起消息

    当我看到服务器的日志时,就像这样

    16:55:36.608 INFO - Executing: [send keys: 2 org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebEleme
    nt@8e7c2cfc, [r, o, o, t]] at URL: /session/b0da54ee-6029-4ff6-b0b7-2d9b44cbb81c/element/2/value)
    16:56:36.631 INFO - Executing: [delete session: b0da54ee-6029-4ff6-b0b7-2d9b44cbb81c] at URL: /session/b0da54ee-6029-4ff
    6-b0b7-2d9b44cbb81c)
    

    有人可以帮帮我吗?

0 个答案:

没有答案