I am running a ubuntu server with apache/php/mysql. I want to use selenium on one of my php projects. Basically, I want a setup where I can more or less copy paste code from the Firefox Selenium IDE (format set to php) into my php project, like this:
<?php
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
class Example extends PHPUnit_Extensions_SeleniumTestCase
{
protected function setUp()
{
$this->setBrowser("*chrome");
$this->setBrowserUrl("http://www.google.com/");
}
public function testMyTestCase()
{
$this->type("q", "stack overflow");
$this->click("link=2");
$this->waitForPageToLoad("30000");
$this->click("btnG");
$this->waitForPageToLoad("30000");
$this->type("q", "stack overflow php");
$this->click("btnG");
$this->waitForPageToLoad("30000");
}
}
?>
I have tried to figure out how to do this in PHP using Selenium RC, but the documentation is confusing and outdated.
I would be very grateful for instructions for beginners on how to get started with PHP and Selenium RC.
Thank you very much.
EDIT:
Thanks for the feedback. I have got Selenium up and running on Ubuntu/firefox and it is obvious that this is not what I am looking for. The fact that it runs a java server and is dependent on a full blown browser makes it anything than lightweight.