Source for file selenese_tester.php
Documentation is available at selenese_tester.php
* @package SeleneseTestCase
* @version $Id: selenese_tester.php 1534 2007-06-06 16:58:53Z pp11 $
* include SimpleTest files
require_once dirname(__FILE__
).
'/../unit_tester.php';
require_once dirname(__FILE__
).
'/selenium/remote-control.php';
* Integrate selenese html test suite support (can be generated by selenium-IDE)
* @package selenese_tester
* @author Guidet Alexandre <alwex@free.fr>
* @param simpleSelenium $selenium
* @param string $testFile
* @param array $parsed_table
* @param string $logMessages
* @param array $_commandMap
"verifyNotFailureOnNext",
"verifyNotAllWindowNames",
"verifyNotAllWindowTitles",
"verifyAttributeFromAllWindows",
"verifyNotAttributeFromAllWindows",
"verifyNotCursorPosition",
"verifyNotElementHeight",
"verifyElementPositionLeft",
"verifyNotElementPositionLeft",
"verifyElementPositionTop",
"verifyNotElementPositionTop",
"verifyNotSelectedIndex",
"verifyNotSelectedIndexes",
"verifyNotSelectedLabel",
"verifyNotSelectedLabels",
"verifyNotSelectedValue",
"verifyNotSelectedValues",
"verifyNotSelectOptions",
"verifyWhetherThisFrameMatchFrameExpression",
"verifyNotWhetherThisFrameMatchFrameExpression",
"verifyWhetherThisWindowMatchWindowExpression",
"verifyNotWhetherThisWindowMatchWindowExpression",
"verifyConfirmationPresent",
"verifyConfirmationNotPresent",
"verifyElementNotPresent",
"verifyPromptNotPresent",
"verifySomethingSelected",
"verifyNotSomethingSelected",
"assertNotFailureOnNext",
"assertNotAllWindowNames",
"assertNotAllWindowTitles",
"assertAttributeFromAllWindows",
"assertNotAttributeFromAllWindows",
"assertNotCursorPosition",
"assertNotElementHeight",
"assertElementPositionLeft",
"assertNotElementPositionLeft",
"assertElementPositionTop",
"assertNotElementPositionTop",
"assertNotSelectedIndex",
"assertNotSelectedIndexes",
"assertNotSelectedLabel",
"assertNotSelectedLabels",
"assertNotSelectedValue",
"assertNotSelectedValues",
"assertNotSelectOptions",
"assertWhetherThisFrameMatchFrameExpression",
"assertNotWhetherThisFrameMatchFrameExpression",
"assertWhetherThisWindowMatchWindowExpression",
"assertNotWhetherThisWindowMatchWindowExpression",
"assertConfirmationPresent",
"assertConfirmationNotPresent",
"assertElementNotPresent",
"assertPromptNotPresent",
"assertSomethingSelected",
"assertNotSomethingSelected",
* Construct the object with the specified browser and url
* Reformat the selenium-IDE html test suites
* Extract the called selenium fonction from the html suite
$contenthtml =
new DOMDocument;
@$contenthtml->loadHtml($this->html);
foreach ($content->body->table->tbody->tr as $tr){
foreach ($tr->td as $td){
$parsedTab[$key1][$key2] =
$td;
* Integrate selenium fonctions in simpletest
* @param string $function
$_verifyMap =
array('verify', 'verifyTextPresent', 'verifyTextNotPresent', 'verifyValue');
$reponse =
$this->selenium->__call($function, array($param1, $param2));
$message .=
" using command '".
$function .
"' with target '".
$param1.
"'";
$message .=
" and value '".
$param2.
"'";
$message .=
" in file '".
$this->testFile.
"'";
if (!in_array($function, $_verifyMap)) {
$reponse =
substr($reponse, 0, 2) ==
'OK' ?
true :
false;
$this->assertTrue($reponse, $message);
* Launch the html test suite from a PHP variable on the url declared wihle
* constructing the object. The filename is used to localize the error.
* @param string $testFile
* @param string $filename
$this->selenium->__call($test[0], array($test[1], $test[2]));
* Parse the PHP file then launch the computed test suite
* Launch the html test suite file on the url declared wihle constructing the object
* @param string $testFile
Documentation generated on Sun, 04 May 2008 09:22:05 -0500 by phpDocumentor 1.3.0