<?php
// set the path for where simpletest is
$path = '/usr/share/php' . PATH_SEPARATOR . '/usr/lib/iceweasel';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
require_once 'simpletest/unit_tester.php';
require_once 'simpletest/reporter.php';
require_once 'Testing/Selenium.php';
error_reporting(E_ALL);
// require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
class uploadfileTest extends UnitTestCase
{
private $selenium;
/* function setUp()
{
$this->setBrowser("*chrome");
$this->setBrowserUrl("");
}
*/
public function setUp()
{
$this->selenium = new Testing_Selenium("*firefox /usr/lib/iceweasel/firefox-bin", "somewherein HP/");
$this->selenium->start();
}
public function tearDown()
{
$this->selenium->stop();
}
function testMyTestCase()
{
$this->open("/repo/");
$this->click("link=From File");
$this->waitForPageToLoad("30000");
$this->select("folder", "label=regexp:\\s+Rando");
$this->type("getfile", "/home/markd/Desktop/selenium-remote-control-0.9.2-dist.zip");
$this->type("description", "test of file upload");
$this->click("Check_agent_license");
$this->click("Check_agent_mimetype");
$this->click("Check_agent_pkgmetagetta");
$this->click("Check_agent_specagent");
$this->click("//input[@value='Upload!']");
$this->waitForPageToLoad("30000");
}
}
$test = new uploadfileTest();
$test->run(new TextReporter());
?>
Bookmarks