Source for file selenese_tester.php
Documentation is available at selenese_tester.php
* @version $Id: selenese_tester.php 1802 2008-09-08 10:43:58Z maetl_ $
* 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)
* @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;
* 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 Thu, 01 Oct 2009 20:55:45 -0500 by phpDocumentor 1.4.2