I am using phpunit 3.4.15.
On Centos 5.3 linux I started Selenium server 1.0.3: java -jar selenium-server.jar
I would like to call a browser running on Windows to run the test.
This is the script I try to run:
<?php
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
class Example extends PHPUnit_Extensions_SeleniumTestCase
{
function setUp()
{
$this->setHost("win_ip_address");
$this->setPort(4444);
$this->setBrowser("*firefox");
$this->setBrowserUrl("http://www.google.com/");
}
function testMyTestCase()
{
$this->open("/");
$this->type("q", "selenium rc");
$this->click("btnG");
$this->waitForPageToLoad("30000");
$this->assertTrue($this->isTextPresent("Results * for selenium rc"));
}
}
?>
The script is run on the same linux machine: phpunit unittest, and when it finishes it states, "PHPUnit_Framework_Exception: Could not connect to the Selenium RC server." Does SetHost need to be set to the selenium server? If so, how do I tell it to call firefox on windows from a different machine? Thanks.