I am running an ubuntu server with apache / php / mysql. I want to use selenium in one of my php projects. Basically, I need a setting where I can more or less copy the paste code from the Selenium IDE (format configured on php) into my php project, for example:
<?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", "Qaru php");
$this->click("btnG");
$this->waitForPageToLoad("30000");
}
}
?>
I 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 the beginner's instructions on how to get started with PHP and Selenium RC.
Many thanks.
EDIT:
Thanks for the feedback. I have Selenium and runs on Ubuntu / firefox, and obviously this is not what I'm looking for. The fact that it runs a java server and is dependent on a full-blown browser makes it something easy.
- , php dom/html, , .