cvs: pear /Selenium ChangeLog Selenium.php makepackage.php package.xml package2.xml /Selenium/Selenium Exception.php /Selenium/examples example.php
/Selenium/tests Bug8891.php Bug8893.php SeleniumTest.php
| From: | Shin OHNO | Date: | Sat, 14 Oct 2006 17:44:33 +0000 |
| Subject: | cvs: pear /Selenium ChangeLog Selenium.php makepackage.php package.xml package2.xml /Selenium/Selenium Exception.php /Selenium/examples example.php /Selenium/tests Bug8891.php Bug8893.php SeleniumTest.php |
||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-42563@lists.php.net to get a copy of this message | ||
shin Sat Oct 14 17:44:33 2006 UTC
Modified files:
/pear/Selenium ChangeLog Selenium.php makepackage.php package.xml
package2.xml
/pear/Selenium/Selenium Exception.php
/pear/Selenium/examples example.php
/pear/Selenium/tests Bug8891.php Bug8893.php SeleniumTest.php
Log:
Changing class name: Selenium to Testing_Selenium.
http://cvs.php.net/viewvc.cgi/pear/Selenium/ChangeLog?r1=1.2&r2=1.3&diff_format=u Index: pear/Selenium/ChangeLog diff -u pear/Selenium/ChangeLog:1.2 pear/Selenium/ChangeLog:1.3 --- pear/Selenium/ChangeLog:1.2 Thu Oct 12 17:11:29 2006 +++ pear/Selenium/ChangeLog Sat Oct 14 17:44:33 2006 @@ -1,6 +1,10 @@ -$Id: ChangeLog,v 1.2 2006/10/12 17:11:29 shin Exp $ +$Id: ChangeLog,v 1.3 2006/10/14 17:44:33 shin Exp $ see package.xml for newer changlogs 2006-10-13 Shin Ohno<ganchiku@gmail.com> + * VERSION: version 0.2.0 (alpha) released. + - Changed package name. Selenium to Testing_Selenium. + +2006-10-13 Shin Ohno<ganchiku@gmail.com> * VERSION: version 0.1.5 (alpha) released. - Fixed Bug#8891. See Bug8891.php http://cvs.php.net/viewvc.cgi/pear/Selenium/Selenium.php?r1=1.4&r2=1.5&diff_format=u Index: pear/Selenium/Selenium.php diff -u pear/Selenium/Selenium.php:1.4 pear/Selenium/Selenium.php:1.5 --- pear/Selenium/Selenium.php:1.4 Thu Oct 12 17:11:29 2006 +++ pear/Selenium/Selenium.php Sat Oct 14 17:44:33 2006 @@ -29,27 +29,27 @@ * * * @category Testing - * @package Selenium + * @package Testing_Selenium * @author Shin Ohno <ganchiku@gmail.com> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version 0.1.5 + * @version 0.2.0 * @see http://www.openqa.org/selenium-rc/ - * @since 0.1.0 + * @since 0.2.0 */ /** * Selenium exception class */ -require_once 'Selenium/Exception.php'; +require_once 'Testing/Selenium/Exception.php'; /** * Selenium * - * @package Selenium - * @version 0.1.5 + * @package Testing_Selenium + * @version 0.2.0 * @author Shin Ohno <ganchiku@gmail.com> */ -class Selenium +class Testing_Selenium { // {{{ class vars /** @@ -105,7 +105,7 @@ * @param int $timeout * @param string $driver * @access public - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ function __construct($browser, $browserUrl, $host = 'localhost', $port = 4444, $timeout = 30000, $driver = 'curl') { @@ -125,14 +125,14 @@ * @param string $driver * @access public * @return void - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function setDriver($driver) { if ($driver == 'curl' or $driver == 'pear' or $driver == 'native') { $this->driver = $driver; } else { - throw new Selenium_Exception('Driver has to be "curl" or "pear" or "native"'); + throw new Testing_Selenium_Exception('Driver has to be "curl" or "pear" or "native"'); } } // }}} @@ -142,7 +142,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function start() { @@ -156,7 +156,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function stop() { @@ -172,7 +172,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function click($locator) { @@ -188,7 +188,7 @@ * @param string $eventName the event name, e.g. "focus" or "blur" * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function fireEvent($locator, $eventName) { @@ -203,7 +203,7 @@ * @param string $keycode the numeric keycode of the key to be pressed, normally the ASCII value of that key. * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function keyPress($locator, $keycode) { @@ -218,7 +218,7 @@ * @param string $keycode the numeric keycode of the key to be pressed, normally the ASCII value of that key. * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function keyDown($locator, $keycode) { @@ -233,7 +233,7 @@ * @param string $keycode the numeric keycode of the key to be pressed, normally the ASCII value of that key. * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function keyUp($locator, $keycode) { @@ -247,7 +247,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function mouseOver($locator) { @@ -262,7 +262,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function mouseDown($locator) { @@ -280,7 +280,7 @@ * @param string $value the value to type * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function type($locator, $value) { @@ -294,7 +294,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function check($locator) { @@ -308,7 +308,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function uncheck($locator) { @@ -347,7 +347,7 @@ * @param string $optionLocator an option locator (a label by default) * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function select($selectLocator, $optionLocator) { @@ -362,7 +362,7 @@ * @param string $optionLocator an option locator (a label by default) * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function addSelection($locator, $optionLocator) { @@ -377,7 +377,7 @@ * @param string $optionLocator an option locator (a label by default) * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function removeSelection($locator, $optionLocator) { @@ -392,7 +392,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function submit($locator) { @@ -415,7 +415,7 @@ * @param string $url the URL to open; may be relative or absolute * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function open($url) { @@ -431,7 +431,7 @@ * @param string $windowId the JavaScript window ID of the window to select * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function selectWindow($windowId) { @@ -446,7 +446,7 @@ * @param int $timeout a timeout in milliseconds, after which the action will return with an error * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function waitForPopUp($windowId, $timeout = null) { @@ -465,7 +465,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function chooseCancelOnNextConfirmation() { @@ -480,7 +480,7 @@ * @param string $answer the answer to give in response to the prompt pop-up * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function answerOnNextPrompt($answer) { @@ -493,7 +493,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function goBack() { @@ -506,7 +506,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function refresh() { @@ -520,7 +520,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function close() { @@ -533,7 +533,7 @@ * * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isAlertPresent() { @@ -546,7 +546,7 @@ * * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isPromptPresent() { @@ -559,7 +559,7 @@ * * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isConfirmationPresent() { @@ -581,7 +581,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getAlert() { @@ -605,7 +605,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getConfirmation() { @@ -628,7 +628,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getPrompt() { @@ -641,7 +641,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getLocation() { @@ -654,7 +654,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getTitle() { @@ -667,7 +667,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getBodyText() { @@ -683,7 +683,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getValue($locator) { @@ -700,7 +700,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getText($locator) { @@ -723,7 +723,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getEval($script) { @@ -737,7 +737,7 @@ * @param string $locator an element locator * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isChecked($locator) { @@ -752,7 +752,7 @@ * @param string $tableCellAddress a cell address, e.g. "foo.1.4" * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getTable($tableCellAddress) { @@ -766,7 +766,7 @@ * @param string $optionLocator an option locator (a label by default) * @access public * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectedLabels($selectLocator) { @@ -780,7 +780,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectedLabel($selectLocator) { @@ -794,7 +794,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectedValues($selectLocator) { @@ -808,7 +808,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectedValue($selectLocator) { @@ -822,7 +822,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectedIndexes($selectLocator) { @@ -836,7 +836,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectedIndex($selectLocator) { @@ -850,7 +850,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectedIds($selectLocator) { @@ -864,7 +864,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectedId($selectLocator) { @@ -878,7 +878,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isSomethingSelected($selectLocator) { @@ -892,7 +892,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectOptions($selectLocator) { @@ -906,7 +906,7 @@ * @param string $attributeLocator an element locator followd by an * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getAttribute($attributeLocator) { @@ -920,7 +920,7 @@ * @param string $pattern a pattern to match with the text of the page * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isTextPresent($pattern) { @@ -934,7 +934,7 @@ * @param string $locator an element locator * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isElementPresent($locator) { @@ -952,7 +952,7 @@ * @param string $locator an element locator * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isVisible($locator) { @@ -967,7 +967,7 @@ * @param string $locator an element locator * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isEditable($locator) { @@ -981,7 +981,7 @@ * * @access public * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getAllButtons() { @@ -995,7 +995,7 @@ * * @access public * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getAllLinks() { @@ -1009,7 +1009,7 @@ * * @access public * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getAllFields() { @@ -1023,7 +1023,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getHtmlSource() { @@ -1041,7 +1041,7 @@ * @param int $position the numerical position of the cursor in the field; position should be 0 to move the position to the beginning of the field. You can also set the cursor to -1 to move it to the endo of the field. * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function setCursorPosition($locator, $position) { @@ -1058,7 +1058,7 @@ * @param string $locator an element locator poiting to an input element or textarea * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getCursorPosition($locator) { @@ -1079,7 +1079,7 @@ * @param string $logLevelThreashould one of "debug", "info", "warn" , "error", sets the thrshould for browser-side logging * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function setContext($context, $logLevelThreashould) { @@ -1096,7 +1096,7 @@ * @param string $expression the value to return * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getExpression($expression) { @@ -1117,7 +1117,7 @@ * @param int $timeout in milliseconds, after which this command will return with an error * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function waitForCondition($script, $timeout = null) { @@ -1136,7 +1136,7 @@ * @param int $timeout in milliseconds, after which the action will return with an error * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function setTimeout($timeout) { @@ -1157,7 +1157,7 @@ * @param string $timeout a timeout in milliseconds, after which this command will return with an error * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function waitForPageToLoad($timeout = null) { @@ -1177,7 +1177,7 @@ * @param array $args * @access private * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ private function doCommand($verb, $args = array()) { @@ -1199,7 +1199,7 @@ } if (!preg_match('/^OK/', $response)) { - throw new Selenium_Exception('The Response of the Selenium RC is invalid: ' . $response); + throw new Testing_Selenium_Exception('The Response of the Selenium RC is invalid: ' . $response); } return $response; } @@ -1213,7 +1213,7 @@ * @param string $url * @access private * @return string - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ private function useHTTP_Request($verb, $args, $url) { @@ -1222,7 +1222,7 @@ $request->_sock->blocking = false; $result = $request->sendRequest(); if (PEAR::isError($result)) { - throw Selenium_Exception('Can not connect to Selenium RC Server: '. $result->getMessage(), $request->getResponseCode()); + throw Testing_Selenium_Exception('Can not connect to Selenium RC Server: '. $result->getMessage(), $request->getResponseCode()); } return $request->getResponseBody(); } @@ -1236,12 +1236,12 @@ * @param string $url * @access private * @return string - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ private function useNative($verb, $args, $url) { if (!$handle = fopen($url, 'r')) { - throw new Selenium_Exception('Cannot connected to Selenium RC Server'); + throw new Testing_Selenium_Exception('Cannot connected to Selenium RC Server'); } // no socket block stream_set_blocking($handle, false); @@ -1260,22 +1260,22 @@ * @param string $url * @access private * @return string - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ private function useCurl($verb, $args, $url) { if (!function_exists('curl_init')) { - throw new Selenium_Exception('cannot use curl exntensions. chosse "pear" or "native"'); + throw new Testing_Selenium_Exception('cannot use curl exntensions. chosse "pear" or "native"'); } if (!$ch = curl_init($url)) { - throw new Selenium_Exception('Unable to setup curl'); + throw new Testing_Selenium_Exception('Unable to setup curl'); } curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); if (($errno = curl_errno($ch)) != 0) { - throw new Selenium_Exception('Curl returned non-null errno ' . $errno . ':' . curl_error($ch)); + throw new Testing_Selenium_Exception('Curl returned non-null errno ' . $errno . ':' . curl_error($ch)); } curl_close($ch); return $result; @@ -1289,13 +1289,13 @@ * @param array $arg * @access protected * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ private function getString($verb, $args = array()) { try { $result = $this->doCommand($verb, $args); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { return $e; } return substr($result, 3); @@ -1309,7 +1309,7 @@ * @param array $args * @access protected * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ private function getStringArray($verb, $args = array()) { @@ -1346,7 +1346,7 @@ * @param array $args * @access private * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ private function getBoolean($verb, $args = array()) { @@ -1357,7 +1357,7 @@ case 'false': return false; default: - throw new Selenium_Exception('result is neither "true" or "false": ' . $result); + throw new Testing_Selenium_Exception('result is neither "true" or "false": ' . $result); } } // }}} http://cvs.php.net/viewvc.cgi/pear/Selenium/makepackage.php?r1=1.3&r2=1.4&diff_format=u Index: pear/Selenium/makepackage.php diff -u pear/Selenium/makepackage.php:1.3 pear/Selenium/makepackage.php:1.4 --- pear/Selenium/makepackage.php:1.3 Thu Oct 12 17:11:29 2006 +++ pear/Selenium/makepackage.php Sat Oct 14 17:44:33 2006 @@ -5,18 +5,17 @@ unlink('package.xml'); -$releaseVersion = '0.1.5'; -$apiVersion = '0.1.5'; +$releaseVersion = '0.2.0'; +$apiVersion = '0.2.0'; $changelog = ' - - Fixed Bug#8891. See Bug8891.php - - Changed method name "isTextPattern" to "isTextPresent" + - Changed package name. Selenium to Testing_Selenium. '; -$notes = 'Fixed bug'; +$notes = 'Changed package name. Selenium to Testing_Selenium.'; $packagexml = new PEAR_PackageFileManager2(); $packagexml->setOptions(array('filelistgenerator' => 'file', 'packagefile' => 'package2.xml', 'packagedirectory' => dirname(__FILE__), - 'baseinstalldir' => '/', + 'baseinstalldir' => 'Testing', 'ignore' => array('makepackage.php', 'Documentation/', 'ver/', 'CVS/'), 'simpleoutput' => true, 'changelogoldtonew' => true, @@ -28,7 +27,7 @@ $packagexml->setPackageType('php'); $packagexml->addRelease(); $packagexml->setChannel('pear.php.net'); -$packagexml->setPackage('Selenium'); +$packagexml->setPackage('Testing_Selenium'); $packagexml->setReleaseVersion($releaseVersion); $packagexml->setAPIVersion($apiVersion); $packagexml->setReleaseStability('alpha'); http://cvs.php.net/viewvc.cgi/pear/Selenium/package.xml?r1=1.2&r2=1.3&diff_format=u Index: pear/Selenium/package.xml diff -u pear/Selenium/package.xml:1.2 pear/Selenium/package.xml:1.3 --- pear/Selenium/package.xml:1.2 Fri Sep 15 16:39:19 2006 +++ pear/Selenium/package.xml Sat Oct 14 17:44:33 2006 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0"> <package version="1.0" packagerversion="1.4.9"> - <name>Selenium</name> + <name>Testing_Selenium</name> <summary>PHP Client for Selenium RC</summary> <description>PHP Client for Selenium RC </description> @@ -20,11 +20,11 @@ </maintainer> </maintainers> <release> - <version>0.1.4</version> - <date>2006-09-16</date> + <version>0.2.0</version> + <date>2006-10-15</date> <license>PHP License</license> <state>alpha</state> - <notes>Fixed class name and some documents + <notes>Changed package name. Selenium to Testing_Selenium. </notes> <deps> <dep type="php" rel="ge" version="5.1.0" optional="no"/> @@ -32,7 +32,7 @@ <dep type="ext" rel="has" optional="yes">curl</dep> </deps> <filelist> - <dir name="/" baseinstalldir="/"> + <dir name="/" baseinstalldir="Testing"> <dir name="examples"> <file role="doc" name="example.php"> <replace from="@PEAR-VER@" to="version" type="package-info"/> @@ -177,6 +177,12 @@ <replace from="@PEAR-VER@" to="version" type="package-info"/> </file> </dir> <!-- /tests/html --> + <file role="test" name="Bug8891.php"> + <replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + <file role="test" name="Bug8893.php"> + <replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> <file role="test" name="SeleniumTest.php"> <replace from="@PEAR-VER@" to="version" type="package-info"/> </file> @@ -238,8 +244,25 @@ <license>PHP License</license> <state>alpha</state> <notes>- Removed Testing prefix from the class name. Not Testing_Selenium, but Selenium. - - Removed unnecessary docblock. - - Fixed fixed comment documents. +- Removed unnecessary docblock. +- Fixed fixed comment documents. + </notes> + </release> + <release> + <version>0.1.5</version> + <date>2006-10-13</date> + <license>PHP License</license> + <state>alpha</state> + <notes>- Fixed Bug#8891. See Bug8891.php +- Changed method name "isTextPattern" to "isTextPresent" + </notes> + </release> + <release> + <version>0.2.0</version> + <date>2006-10-15</date> + <license>PHP License</license> + <state>alpha</state> + <notes>- Changed package name. Selenium to Testing_Selenium. </notes> </release> </changelog> http://cvs.php.net/viewvc.cgi/pear/Selenium/package2.xml?r1=1.2&r2=1.3&diff_format=u Index: pear/Selenium/package2.xml diff -u pear/Selenium/package2.xml:1.2 pear/Selenium/package2.xml:1.3 --- pear/Selenium/package2.xml:1.2 Fri Sep 15 16:39:19 2006 +++ pear/Selenium/package2.xml Sat Oct 14 17:44:33 2006 @@ -3,7 +3,7 @@ http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> - <name>Selenium</name> + <name>Testing_Selenium</name> <channel>pear.php.net</channel> <summary>PHP Client for Selenium RC</summary> <description>PHP Client for Selenium RC</description> @@ -19,20 +19,20 @@ <email>bjoern@thinkphphq.de</email> <active>yes</active> </developer> - <date>2006-09-16</date> - <time>01:17:30</time> + <date>2006-10-15</date> + <time>02:35:24</time> <version> - <release>0.1.4</release> - <api>0.1.0</api> + <release>0.2.0</release> + <api>0.2.0</api> </version> <stability> <release>alpha</release> <api>alpha</api> </stability> <license uri="http://www.php.net/license">PHP License</license> - <notes>Fixed class name and some documents</notes> + <notes>Changed package name. Selenium to Testing_Selenium.</notes> <contents> - <dir baseinstalldir="/" name="/"> + <dir baseinstalldir="Testing" name="/"> <dir name="examples"> <file name="example.php" role="doc"> <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> @@ -177,6 +177,12 @@ <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> </file> </dir> <!-- /tests/html --> + <file name="Bug8891.php" role="test"> + <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> + </file> + <file name="Bug8893.php" role="test"> + <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> + </file> <file name="SeleniumTest.php" role="test"> <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> </file> @@ -282,10 +288,37 @@ </stability> <date>2006-09-16</date> <license uri="http://www.php.net/license">PHP License</license> + <notes>- Removed Testing prefix from the class name. Not Testing_Selenium, but Selenium. +- Removed unnecessary docblock. +- Fixed fixed comment documents.</notes> + </release> + <release> + <version> + <release>0.1.5</release> + <api>0.1.5</api> + </version> + <stability> + <release>alpha</release> + <api>alpha</api> + </stability> + <date>2006-10-13</date> + <license uri="http://www.php.net/license">PHP License</license> + <notes>- Fixed Bug#8891. See Bug8891.php +- Changed method name "isTextPattern" to "isTextPresent"</notes> + </release> + <release> + <version> + <release>0.2.0</release> + <api>0.2.0</api> + </version> + <stability> + <release>alpha</release> + <api>alpha</api> + </stability> + <date>2006-10-15</date> + <license uri="http://www.php.net/license">PHP License</license> <notes> - - Removed Testing prefix from the class name. Not Testing_Selenium, but Selenium. - - Removed unnecessary docblock. - - Fixed fixed comment documents. + - Changed package name. Selenium to Testing_Selenium. </notes> </release> </changelog> http://cvs.php.net/viewvc.cgi/pear/Selenium/Selenium/Exception.php?r1=1.2&r2=1.3&diff_format=u Index: pear/Selenium/Selenium/Exception.php diff -u pear/Selenium/Selenium/Exception.php:1.2 pear/Selenium/Selenium/Exception.php:1.3 --- pear/Selenium/Selenium/Exception.php:1.2 Thu Oct 12 17:11:29 2006 +++ pear/Selenium/Selenium/Exception.php Sat Oct 14 17:44:33 2006 @@ -23,11 +23,11 @@ * Testing_Selenium_Exception * * @category Testing - * @package Selenium + * @package Testing_Selenium * @author Shin Ohno <ganchiku@gmail.com> - * @version 0.1.5 + * @version 0.2.0 */ -class Selenium_Exception extends PEAR_Exception +class Testing_Selenium_Exception extends PEAR_Exception { } ?> http://cvs.php.net/viewvc.cgi/pear/Selenium/examples/example.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: pear/Selenium/examples/example.php diff -u pear/Selenium/examples/example.php:1.1.1.1 pear/Selenium/examples/example.php:1.2 --- pear/Selenium/examples/example.php:1.1.1.1 Wed Sep 6 16:08:08 2006 +++ pear/Selenium/examples/example.php Sat Oct 14 17:44:33 2006 @@ -1,8 +1,8 @@ <?php error_reporting(E_ALL|E_STRICT); -require_once 'Selenium.php'; +require_once 'Testing/Selenium.php'; try { - $selenium = new Selenium("*firefox", "http://pear.php.net/"); + $selenium = new Testing_Selenium("*firefox", "http://pear.php.net/"); $result = $selenium->start(); $selenium->open("http://pear.php.net/packages.php"); if ($selenium->getTitle() == "PEAR :: Package Browser :: Top Level") { @@ -28,7 +28,7 @@ /* // To see this example, you need to have Simpletest library. // You can't run simpletest with E_STRICT -require_once 'Selenium.php'; +require_once 'Testing/Selenium.php'; require_once 'simpletest/unit_tester.php'; require_once 'simpletest/reporter.php'; @@ -36,7 +36,7 @@ { function setUp() { - $this->selenium = new Selenium("*firefox", "http://pear.php.net/"); + $this->selenium = new Testing_Selenium("*firefox", "http://pear.php.net/"); $result = $this->selenium->start(); } function tearDown() @@ -60,7 +60,7 @@ /* With PHP_Unit2 // To see this example, you need to have PHPUnit library. error_reporting(E_ALL|E_STRICT); -require_once 'Selenium.php'; +require_once 'Testing/Selenium.php'; require_once 'PHPUnit2/Framework/TestCase.php'; class Example extends PHPUnit2_Framework_TestCase @@ -71,7 +71,7 @@ } function setUp() { - $this->selenium = new Selenium("*firefox", "http://pear.php.net/"); + $this->selenium = new Testing_Selenium("*firefox", "http://pear.php.net/"); // XXX pear does not work E_STRICT because of HTTP_Request // the options are "curl", "pear", "native" // $this->selenium->setDriver("pear"); http://cvs.php.net/viewvc.cgi/pear/Selenium/tests/Bug8891.php?r1=1.1&r2=1.2&diff_format=u Index: pear/Selenium/tests/Bug8891.php diff -u pear/Selenium/tests/Bug8891.php:1.1 pear/Selenium/tests/Bug8891.php:1.2 --- pear/Selenium/tests/Bug8891.php:1.1 Thu Oct 12 17:02:29 2006 +++ pear/Selenium/tests/Bug8891.php Sat Oct 14 17:44:33 2006 @@ -1,5 +1,5 @@ <?php -require_once '../Selenium.php'; +require_once 'Testing/Selenium.php'; require_once 'PHPUnit2/Framework/TestCase.php'; class Bug8891 extends PHPUnit2_Framework_TestCase @@ -16,9 +16,9 @@ public function setUp() { try { - $this->selenium = new Selenium("*firefox", $this->browserUrl); + $this->selenium = new Testing_Selenium("*firefox", $this->browserUrl); $this->selenium->start(); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -28,7 +28,7 @@ { try { $this->selenium->stop(); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { echo $e; } } http://cvs.php.net/viewvc.cgi/pear/Selenium/tests/Bug8893.php?r1=1.1&r2=1.2&diff_format=u Index: pear/Selenium/tests/Bug8893.php diff -u pear/Selenium/tests/Bug8893.php:1.1 pear/Selenium/tests/Bug8893.php:1.2 --- pear/Selenium/tests/Bug8893.php:1.1 Thu Oct 12 17:02:29 2006 +++ pear/Selenium/tests/Bug8893.php Sat Oct 14 17:44:33 2006 @@ -1,5 +1,5 @@ <?php -require_once '../Selenium.php'; +require_once 'Testing/Selenium.php'; require_once 'PHPUnit2/Framework/TestCase.php'; class Bug8893 extends PHPUnit2_Framework_TestCase @@ -16,7 +16,7 @@ public function setUp() { try { - $this->selenium = new Selenium("*firefox", $this->browserUrl); + $this->selenium = new Testing_Selenium("*firefox", $this->browserUrl); $this->selenium->start(); } catch (Selenium_Exception $e) { $this->selenium->stop(); http://cvs.php.net/viewvc.cgi/pear/Selenium/tests/SeleniumTest.php?r1=1.3&r2=1.4&diff_format=u Index: pear/Selenium/tests/SeleniumTest.php diff -u pear/Selenium/tests/SeleniumTest.php:1.3 pear/Selenium/tests/SeleniumTest.php:1.4 --- pear/Selenium/tests/SeleniumTest.php:1.3 Fri Sep 15 16:39:19 2006 +++ pear/Selenium/tests/SeleniumTest.php Sat Oct 14 17:44:33 2006 @@ -3,7 +3,7 @@ // Selenium RC Server is available the following website. // http://openqa.org/selenium-rc/ //error_reporting(E_ALL|E_STRICT); -require_once 'Selenium.php'; +require_once 'Testing/Selenium.php'; require_once 'PHPUnit2/Framework/TestCase.php'; class SeleniumTest extends PHPUnit2_Framework_TestCase @@ -26,12 +26,12 @@ public function setUp() { try { - $this->selenium = new Selenium("*firefox", $this->browserUrl); + $this->selenium = new Testing_Selenium("*firefox", $this->browserUrl); // XXX pear does not work E_STRICT because of HTTP_Request // the options are "curl", "pear", "native" // $this->selenium->setDriver("pear"); $this->selenium->start(); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -41,7 +41,7 @@ { try { $this->selenium->stop(); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { echo $e; } } @@ -57,13 +57,12 @@ $this->selenium->open("{$this->testUrl}/html/test_page.slow.html"); $this->assertEquals("{$this->testUrl}/html/test_page.slow.html", $this->selenium->getLocation()); $this->assertEquals("Slow Loading Page", $this->selenium->getTitle()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } } // }}} -/* // {{{ testClick public function testClick() { @@ -94,7 +93,7 @@ $this->selenium->click("linkWithOnclickReturnsFalse"); $this->assertEquals("Click Page 1", $this->selenium->getTitle()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -123,7 +122,7 @@ $this->selenium->click("enclosedImage"); $this->assertEquals("enclosedImage clicked", $this->selenium->getAlert()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -145,7 +144,7 @@ $this->assertRegExp("/Welcome, TestUser!/", $this->selenium->getText("//h2")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -182,7 +181,7 @@ $this->selenium->select("theSelect", ""); $this->assertEquals("", $this->selenium->getSelectedLabel("theSelect")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -218,7 +217,7 @@ $this->assertEquals(2, count($this->selenium->getSelectedLabels("theSelect"))); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -239,7 +238,7 @@ $this->assertEquals("onsubmit called", $this->selenium->getAlert()); $this->assertEquals("form submitted", $this->selenium->getAlert()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -271,7 +270,7 @@ $this->assertNotEquals("on", $this->selenium->getValue("option-chilli")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -305,7 +304,7 @@ $this->assertEquals("{$this->testUrl}/html/test_select_window_popup.html", $this->selenium->getLocation()); $this->selenium->click("closePage"); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -327,7 +326,7 @@ $this->selenium->type("theText", "javascript{10 * 5}"); $this->assertEquals("50", $this->selenium->getValue("theText")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -363,7 +362,7 @@ $this->selenium->waitForPageToLoad(); $this->assertEquals("Slow Loading Page", $this->selenium->getTitle()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -393,7 +392,7 @@ $this->selenium->close(); $this->selenium->selectWindow("null"); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -445,7 +444,7 @@ $this->assertFalse($this->selenium->isElementPresent("dom=document.links[9]")); $this->assertFalse($this->selenium->isElementPresent("dom=foo")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -468,7 +467,7 @@ $this->assertEquals("banner", $this->selenium->getText("//img[contains(@src, 'banner.gif')]/@alt")); $this->assertEquals("this is the second element", $this->selenium->getText("//body/a[2]")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -495,7 +494,7 @@ $this->selenium->click("//input[@name='name2' and @value='yes']"); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -516,7 +515,7 @@ $this->selenium->waitForPageToLoad(); $this->assertEquals("Click Page 1", $this->selenium->getTitle()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -543,7 +542,7 @@ // $this->selenium->waitForPageToLoad(); // $this->assertNotEquals("Changed the text", $this->selenium->getText("theSpan")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -564,7 +563,7 @@ $this->assertEquals("link clicked", $this->selenium->getAlert()); $this->selenium->click("theButton"); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -583,7 +582,7 @@ $this->selenium->click("theSubmit"); $this->assertEquals("{focus(theSubmit)} {click(theSubmit)} {submit} {blur(theSubmit)}", $this->selenium->getValue("eventlog")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -612,7 +611,7 @@ $this->assertEquals("{focus(theSelect)} {change(theSelect)} {blur(theSelect)}", $this->selenium->getValue("eventlog")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -645,7 +644,7 @@ $this->assertEquals("on", $this->selenium->getValue("theRadio2")); $this->assertEquals("{focus(theRadio2)} {click(theRadio2)} {blur(theRadio2)}", $this->selenium->getValue("eventlog")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -668,7 +667,7 @@ $this->assertEquals("off", $this->selenium->getValue("theCheckbox")); $this->assertEquals("{focus(theCheckbox)} {click(theCheckbox)} {change(theCheckbox)} {blur(theCheckbox)}", $this->selenium->getValue("eventlog")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -691,7 +690,7 @@ $this->assertEquals("changed value", $this->selenium->getValue("theTextbox")); $this->assertEquals("{focus(theTextbox)} {select(theTextbox)} {change(theTextbox)} {blur(theTextbox)}", $this->selenium->getValue("eventlog")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -713,7 +712,7 @@ $this->selenium->type("theTextbox", "changed value"); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -730,7 +729,7 @@ $this->selenium->mouseDown("theButton"); $this->assertEquals("{mouseover(theTextbox)} {mouseover(theButton)} {mousedown(theTextbox)} {mousedown(theButton)}", $this->selenium->getValue("eventlog")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -747,7 +746,7 @@ $this->selenium->keyDown("theTextbox", "98"); $this->assertEquals("{keypress(theTextbox - 119)} {keypress(theTextbox - 115)} {keyup(theTextbox - 44)} {keydown(theTextbox - 98)}", $this->selenium->getValue("eventlog")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -761,7 +760,7 @@ $this->selenium->type("testInput", "test"); $this->assertEquals("Bad value", $this->selenium->getAlert()); $this->selenium->type("testInput", "somethingelse"); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -786,7 +785,7 @@ // $this->assertEquals("I'm Melting! I'm Melting!", $this->selenium->getAlert()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -808,7 +807,7 @@ $this->assertEquals("You are about to go to a dummy page.", $this->selenium->getConfirmation()); $this->assertEquals("Dummy Page", $this->selenium->getTitle()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -832,7 +831,7 @@ $this->assertEquals("Type 'yes' and click OK", $this->selenium->getPrompt()); $this->assertEquals("Dummy Page", $this->selenium->getTitle()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -853,7 +852,7 @@ $this->assertFalse($this->selenium->isVisible("suppressedSubElement")); $this->assertFalse($this->selenium->isVisible("jsHiddenParagraph")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -869,7 +868,7 @@ $this->assertFalse($this->selenium->isEditable("disabled_text")); $this->assertFalse($this->selenium->isEditable("disabled_select")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -887,6 +886,7 @@ // public function testCommandError // {} // }}} +/* */ } ?>
http://cvs.php.net/viewvc.cgi/pear/Selenium/ChangeLog?r1=1.2&r2=1.3&diff_format=u Index: pear/Selenium/ChangeLog diff -u pear/Selenium/ChangeLog:1.2 pear/Selenium/ChangeLog:1.3 --- pear/Selenium/ChangeLog:1.2 Thu Oct 12 17:11:29 2006 +++ pear/Selenium/ChangeLog Sat Oct 14 17:44:33 2006 @@ -1,6 +1,10 @@ -$Id: ChangeLog,v 1.2 2006/10/12 17:11:29 shin Exp $ +$Id: ChangeLog,v 1.3 2006/10/14 17:44:33 shin Exp $ see package.xml for newer changlogs 2006-10-13 Shin Ohno<ganchiku@gmail.com> + * VERSION: version 0.2.0 (alpha) released. + - Changed package name. Selenium to Testing_Selenium. + +2006-10-13 Shin Ohno<ganchiku@gmail.com> * VERSION: version 0.1.5 (alpha) released. - Fixed Bug#8891. See Bug8891.php http://cvs.php.net/viewvc.cgi/pear/Selenium/Selenium.php?r1=1.4&r2=1.5&diff_format=u Index: pear/Selenium/Selenium.php diff -u pear/Selenium/Selenium.php:1.4 pear/Selenium/Selenium.php:1.5 --- pear/Selenium/Selenium.php:1.4 Thu Oct 12 17:11:29 2006 +++ pear/Selenium/Selenium.php Sat Oct 14 17:44:33 2006 @@ -29,27 +29,27 @@ * * * @category Testing - * @package Selenium + * @package Testing_Selenium * @author Shin Ohno <ganchiku@gmail.com> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version 0.1.5 + * @version 0.2.0 * @see http://www.openqa.org/selenium-rc/ - * @since 0.1.0 + * @since 0.2.0 */ /** * Selenium exception class */ -require_once 'Selenium/Exception.php'; +require_once 'Testing/Selenium/Exception.php'; /** * Selenium * - * @package Selenium - * @version 0.1.5 + * @package Testing_Selenium + * @version 0.2.0 * @author Shin Ohno <ganchiku@gmail.com> */ -class Selenium +class Testing_Selenium { // {{{ class vars /** @@ -105,7 +105,7 @@ * @param int $timeout * @param string $driver * @access public - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ function __construct($browser, $browserUrl, $host = 'localhost', $port = 4444, $timeout = 30000, $driver = 'curl') { @@ -125,14 +125,14 @@ * @param string $driver * @access public * @return void - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function setDriver($driver) { if ($driver == 'curl' or $driver == 'pear' or $driver == 'native') { $this->driver = $driver; } else { - throw new Selenium_Exception('Driver has to be "curl" or "pear" or "native"'); + throw new Testing_Selenium_Exception('Driver has to be "curl" or "pear" or "native"'); } } // }}} @@ -142,7 +142,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function start() { @@ -156,7 +156,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function stop() { @@ -172,7 +172,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function click($locator) { @@ -188,7 +188,7 @@ * @param string $eventName the event name, e.g. "focus" or "blur" * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function fireEvent($locator, $eventName) { @@ -203,7 +203,7 @@ * @param string $keycode the numeric keycode of the key to be pressed, normally the ASCII value of that key. * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function keyPress($locator, $keycode) { @@ -218,7 +218,7 @@ * @param string $keycode the numeric keycode of the key to be pressed, normally the ASCII value of that key. * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function keyDown($locator, $keycode) { @@ -233,7 +233,7 @@ * @param string $keycode the numeric keycode of the key to be pressed, normally the ASCII value of that key. * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function keyUp($locator, $keycode) { @@ -247,7 +247,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function mouseOver($locator) { @@ -262,7 +262,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function mouseDown($locator) { @@ -280,7 +280,7 @@ * @param string $value the value to type * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function type($locator, $value) { @@ -294,7 +294,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function check($locator) { @@ -308,7 +308,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function uncheck($locator) { @@ -347,7 +347,7 @@ * @param string $optionLocator an option locator (a label by default) * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function select($selectLocator, $optionLocator) { @@ -362,7 +362,7 @@ * @param string $optionLocator an option locator (a label by default) * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function addSelection($locator, $optionLocator) { @@ -377,7 +377,7 @@ * @param string $optionLocator an option locator (a label by default) * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function removeSelection($locator, $optionLocator) { @@ -392,7 +392,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function submit($locator) { @@ -415,7 +415,7 @@ * @param string $url the URL to open; may be relative or absolute * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function open($url) { @@ -431,7 +431,7 @@ * @param string $windowId the JavaScript window ID of the window to select * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function selectWindow($windowId) { @@ -446,7 +446,7 @@ * @param int $timeout a timeout in milliseconds, after which the action will return with an error * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function waitForPopUp($windowId, $timeout = null) { @@ -465,7 +465,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function chooseCancelOnNextConfirmation() { @@ -480,7 +480,7 @@ * @param string $answer the answer to give in response to the prompt pop-up * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function answerOnNextPrompt($answer) { @@ -493,7 +493,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function goBack() { @@ -506,7 +506,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function refresh() { @@ -520,7 +520,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function close() { @@ -533,7 +533,7 @@ * * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isAlertPresent() { @@ -546,7 +546,7 @@ * * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isPromptPresent() { @@ -559,7 +559,7 @@ * * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isConfirmationPresent() { @@ -581,7 +581,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getAlert() { @@ -605,7 +605,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getConfirmation() { @@ -628,7 +628,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getPrompt() { @@ -641,7 +641,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getLocation() { @@ -654,7 +654,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getTitle() { @@ -667,7 +667,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getBodyText() { @@ -683,7 +683,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getValue($locator) { @@ -700,7 +700,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getText($locator) { @@ -723,7 +723,7 @@ * @param string $locator an element locator * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getEval($script) { @@ -737,7 +737,7 @@ * @param string $locator an element locator * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isChecked($locator) { @@ -752,7 +752,7 @@ * @param string $tableCellAddress a cell address, e.g. "foo.1.4" * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getTable($tableCellAddress) { @@ -766,7 +766,7 @@ * @param string $optionLocator an option locator (a label by default) * @access public * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectedLabels($selectLocator) { @@ -780,7 +780,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectedLabel($selectLocator) { @@ -794,7 +794,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectedValues($selectLocator) { @@ -808,7 +808,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectedValue($selectLocator) { @@ -822,7 +822,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectedIndexes($selectLocator) { @@ -836,7 +836,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectedIndex($selectLocator) { @@ -850,7 +850,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectedIds($selectLocator) { @@ -864,7 +864,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectedId($selectLocator) { @@ -878,7 +878,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isSomethingSelected($selectLocator) { @@ -892,7 +892,7 @@ * @param string $selectLocator an element locator identifying a drop-down menu * @access public * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getSelectOptions($selectLocator) { @@ -906,7 +906,7 @@ * @param string $attributeLocator an element locator followd by an * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getAttribute($attributeLocator) { @@ -920,7 +920,7 @@ * @param string $pattern a pattern to match with the text of the page * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isTextPresent($pattern) { @@ -934,7 +934,7 @@ * @param string $locator an element locator * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isElementPresent($locator) { @@ -952,7 +952,7 @@ * @param string $locator an element locator * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isVisible($locator) { @@ -967,7 +967,7 @@ * @param string $locator an element locator * @access public * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function isEditable($locator) { @@ -981,7 +981,7 @@ * * @access public * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getAllButtons() { @@ -995,7 +995,7 @@ * * @access public * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getAllLinks() { @@ -1009,7 +1009,7 @@ * * @access public * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getAllFields() { @@ -1023,7 +1023,7 @@ * * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getHtmlSource() { @@ -1041,7 +1041,7 @@ * @param int $position the numerical position of the cursor in the field; position should be 0 to move the position to the beginning of the field. You can also set the cursor to -1 to move it to the endo of the field. * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function setCursorPosition($locator, $position) { @@ -1058,7 +1058,7 @@ * @param string $locator an element locator poiting to an input element or textarea * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getCursorPosition($locator) { @@ -1079,7 +1079,7 @@ * @param string $logLevelThreashould one of "debug", "info", "warn" , "error", sets the thrshould for browser-side logging * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function setContext($context, $logLevelThreashould) { @@ -1096,7 +1096,7 @@ * @param string $expression the value to return * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function getExpression($expression) { @@ -1117,7 +1117,7 @@ * @param int $timeout in milliseconds, after which this command will return with an error * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function waitForCondition($script, $timeout = null) { @@ -1136,7 +1136,7 @@ * @param int $timeout in milliseconds, after which the action will return with an error * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function setTimeout($timeout) { @@ -1157,7 +1157,7 @@ * @param string $timeout a timeout in milliseconds, after which this command will return with an error * @access public * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ public function waitForPageToLoad($timeout = null) { @@ -1177,7 +1177,7 @@ * @param array $args * @access private * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ private function doCommand($verb, $args = array()) { @@ -1199,7 +1199,7 @@ } if (!preg_match('/^OK/', $response)) { - throw new Selenium_Exception('The Response of the Selenium RC is invalid: ' . $response); + throw new Testing_Selenium_Exception('The Response of the Selenium RC is invalid: ' . $response); } return $response; } @@ -1213,7 +1213,7 @@ * @param string $url * @access private * @return string - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ private function useHTTP_Request($verb, $args, $url) { @@ -1222,7 +1222,7 @@ $request->_sock->blocking = false; $result = $request->sendRequest(); if (PEAR::isError($result)) { - throw Selenium_Exception('Can not connect to Selenium RC Server: '. $result->getMessage(), $request->getResponseCode()); + throw Testing_Selenium_Exception('Can not connect to Selenium RC Server: '. $result->getMessage(), $request->getResponseCode()); } return $request->getResponseBody(); } @@ -1236,12 +1236,12 @@ * @param string $url * @access private * @return string - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ private function useNative($verb, $args, $url) { if (!$handle = fopen($url, 'r')) { - throw new Selenium_Exception('Cannot connected to Selenium RC Server'); + throw new Testing_Selenium_Exception('Cannot connected to Selenium RC Server'); } // no socket block stream_set_blocking($handle, false); @@ -1260,22 +1260,22 @@ * @param string $url * @access private * @return string - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ private function useCurl($verb, $args, $url) { if (!function_exists('curl_init')) { - throw new Selenium_Exception('cannot use curl exntensions. chosse "pear" or "native"'); + throw new Testing_Selenium_Exception('cannot use curl exntensions. chosse "pear" or "native"'); } if (!$ch = curl_init($url)) { - throw new Selenium_Exception('Unable to setup curl'); + throw new Testing_Selenium_Exception('Unable to setup curl'); } curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); if (($errno = curl_errno($ch)) != 0) { - throw new Selenium_Exception('Curl returned non-null errno ' . $errno . ':' . curl_error($ch)); + throw new Testing_Selenium_Exception('Curl returned non-null errno ' . $errno . ':' . curl_error($ch)); } curl_close($ch); return $result; @@ -1289,13 +1289,13 @@ * @param array $arg * @access protected * @return string on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ private function getString($verb, $args = array()) { try { $result = $this->doCommand($verb, $args); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { return $e; } return substr($result, 3); @@ -1309,7 +1309,7 @@ * @param array $args * @access protected * @return array on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ private function getStringArray($verb, $args = array()) { @@ -1346,7 +1346,7 @@ * @param array $args * @access private * @return boolean on success - * @throws Selenium_Exception + * @throws Testing_Selenium_Exception */ private function getBoolean($verb, $args = array()) { @@ -1357,7 +1357,7 @@ case 'false': return false; default: - throw new Selenium_Exception('result is neither "true" or "false": ' . $result); + throw new Testing_Selenium_Exception('result is neither "true" or "false": ' . $result); } } // }}} http://cvs.php.net/viewvc.cgi/pear/Selenium/makepackage.php?r1=1.3&r2=1.4&diff_format=u Index: pear/Selenium/makepackage.php diff -u pear/Selenium/makepackage.php:1.3 pear/Selenium/makepackage.php:1.4 --- pear/Selenium/makepackage.php:1.3 Thu Oct 12 17:11:29 2006 +++ pear/Selenium/makepackage.php Sat Oct 14 17:44:33 2006 @@ -5,18 +5,17 @@ unlink('package.xml'); -$releaseVersion = '0.1.5'; -$apiVersion = '0.1.5'; +$releaseVersion = '0.2.0'; +$apiVersion = '0.2.0'; $changelog = ' - - Fixed Bug#8891. See Bug8891.php - - Changed method name "isTextPattern" to "isTextPresent" + - Changed package name. Selenium to Testing_Selenium. '; -$notes = 'Fixed bug'; +$notes = 'Changed package name. Selenium to Testing_Selenium.'; $packagexml = new PEAR_PackageFileManager2(); $packagexml->setOptions(array('filelistgenerator' => 'file', 'packagefile' => 'package2.xml', 'packagedirectory' => dirname(__FILE__), - 'baseinstalldir' => '/', + 'baseinstalldir' => 'Testing', 'ignore' => array('makepackage.php', 'Documentation/', 'ver/', 'CVS/'), 'simpleoutput' => true, 'changelogoldtonew' => true, @@ -28,7 +27,7 @@ $packagexml->setPackageType('php'); $packagexml->addRelease(); $packagexml->setChannel('pear.php.net'); -$packagexml->setPackage('Selenium'); +$packagexml->setPackage('Testing_Selenium'); $packagexml->setReleaseVersion($releaseVersion); $packagexml->setAPIVersion($apiVersion); $packagexml->setReleaseStability('alpha'); http://cvs.php.net/viewvc.cgi/pear/Selenium/package.xml?r1=1.2&r2=1.3&diff_format=u Index: pear/Selenium/package.xml diff -u pear/Selenium/package.xml:1.2 pear/Selenium/package.xml:1.3 --- pear/Selenium/package.xml:1.2 Fri Sep 15 16:39:19 2006 +++ pear/Selenium/package.xml Sat Oct 14 17:44:33 2006 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0"> <package version="1.0" packagerversion="1.4.9"> - <name>Selenium</name> + <name>Testing_Selenium</name> <summary>PHP Client for Selenium RC</summary> <description>PHP Client for Selenium RC </description> @@ -20,11 +20,11 @@ </maintainer> </maintainers> <release> - <version>0.1.4</version> - <date>2006-09-16</date> + <version>0.2.0</version> + <date>2006-10-15</date> <license>PHP License</license> <state>alpha</state> - <notes>Fixed class name and some documents + <notes>Changed package name. Selenium to Testing_Selenium. </notes> <deps> <dep type="php" rel="ge" version="5.1.0" optional="no"/> @@ -32,7 +32,7 @@ <dep type="ext" rel="has" optional="yes">curl</dep> </deps> <filelist> - <dir name="/" baseinstalldir="/"> + <dir name="/" baseinstalldir="Testing"> <dir name="examples"> <file role="doc" name="example.php"> <replace from="@PEAR-VER@" to="version" type="package-info"/> @@ -177,6 +177,12 @@ <replace from="@PEAR-VER@" to="version" type="package-info"/> </file> </dir> <!-- /tests/html --> + <file role="test" name="Bug8891.php"> + <replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + <file role="test" name="Bug8893.php"> + <replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> <file role="test" name="SeleniumTest.php"> <replace from="@PEAR-VER@" to="version" type="package-info"/> </file> @@ -238,8 +244,25 @@ <license>PHP License</license> <state>alpha</state> <notes>- Removed Testing prefix from the class name. Not Testing_Selenium, but Selenium. - - Removed unnecessary docblock. - - Fixed fixed comment documents. +- Removed unnecessary docblock. +- Fixed fixed comment documents. + </notes> + </release> + <release> + <version>0.1.5</version> + <date>2006-10-13</date> + <license>PHP License</license> + <state>alpha</state> + <notes>- Fixed Bug#8891. See Bug8891.php +- Changed method name "isTextPattern" to "isTextPresent" + </notes> + </release> + <release> + <version>0.2.0</version> + <date>2006-10-15</date> + <license>PHP License</license> + <state>alpha</state> + <notes>- Changed package name. Selenium to Testing_Selenium. </notes> </release> </changelog> http://cvs.php.net/viewvc.cgi/pear/Selenium/package2.xml?r1=1.2&r2=1.3&diff_format=u Index: pear/Selenium/package2.xml diff -u pear/Selenium/package2.xml:1.2 pear/Selenium/package2.xml:1.3 --- pear/Selenium/package2.xml:1.2 Fri Sep 15 16:39:19 2006 +++ pear/Selenium/package2.xml Sat Oct 14 17:44:33 2006 @@ -3,7 +3,7 @@ http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> - <name>Selenium</name> + <name>Testing_Selenium</name> <channel>pear.php.net</channel> <summary>PHP Client for Selenium RC</summary> <description>PHP Client for Selenium RC</description> @@ -19,20 +19,20 @@ <email>bjoern@thinkphphq.de</email> <active>yes</active> </developer> - <date>2006-09-16</date> - <time>01:17:30</time> + <date>2006-10-15</date> + <time>02:35:24</time> <version> - <release>0.1.4</release> - <api>0.1.0</api> + <release>0.2.0</release> + <api>0.2.0</api> </version> <stability> <release>alpha</release> <api>alpha</api> </stability> <license uri="http://www.php.net/license">PHP License</license> - <notes>Fixed class name and some documents</notes> + <notes>Changed package name. Selenium to Testing_Selenium.</notes> <contents> - <dir baseinstalldir="/" name="/"> + <dir baseinstalldir="Testing" name="/"> <dir name="examples"> <file name="example.php" role="doc"> <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> @@ -177,6 +177,12 @@ <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> </file> </dir> <!-- /tests/html --> + <file name="Bug8891.php" role="test"> + <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> + </file> + <file name="Bug8893.php" role="test"> + <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> + </file> <file name="SeleniumTest.php" role="test"> <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> </file> @@ -282,10 +288,37 @@ </stability> <date>2006-09-16</date> <license uri="http://www.php.net/license">PHP License</license> + <notes>- Removed Testing prefix from the class name. Not Testing_Selenium, but Selenium. +- Removed unnecessary docblock. +- Fixed fixed comment documents.</notes> + </release> + <release> + <version> + <release>0.1.5</release> + <api>0.1.5</api> + </version> + <stability> + <release>alpha</release> + <api>alpha</api> + </stability> + <date>2006-10-13</date> + <license uri="http://www.php.net/license">PHP License</license> + <notes>- Fixed Bug#8891. See Bug8891.php +- Changed method name "isTextPattern" to "isTextPresent"</notes> + </release> + <release> + <version> + <release>0.2.0</release> + <api>0.2.0</api> + </version> + <stability> + <release>alpha</release> + <api>alpha</api> + </stability> + <date>2006-10-15</date> + <license uri="http://www.php.net/license">PHP License</license> <notes> - - Removed Testing prefix from the class name. Not Testing_Selenium, but Selenium. - - Removed unnecessary docblock. - - Fixed fixed comment documents. + - Changed package name. Selenium to Testing_Selenium. </notes> </release> </changelog> http://cvs.php.net/viewvc.cgi/pear/Selenium/Selenium/Exception.php?r1=1.2&r2=1.3&diff_format=u Index: pear/Selenium/Selenium/Exception.php diff -u pear/Selenium/Selenium/Exception.php:1.2 pear/Selenium/Selenium/Exception.php:1.3 --- pear/Selenium/Selenium/Exception.php:1.2 Thu Oct 12 17:11:29 2006 +++ pear/Selenium/Selenium/Exception.php Sat Oct 14 17:44:33 2006 @@ -23,11 +23,11 @@ * Testing_Selenium_Exception * * @category Testing - * @package Selenium + * @package Testing_Selenium * @author Shin Ohno <ganchiku@gmail.com> - * @version 0.1.5 + * @version 0.2.0 */ -class Selenium_Exception extends PEAR_Exception +class Testing_Selenium_Exception extends PEAR_Exception { } ?> http://cvs.php.net/viewvc.cgi/pear/Selenium/examples/example.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: pear/Selenium/examples/example.php diff -u pear/Selenium/examples/example.php:1.1.1.1 pear/Selenium/examples/example.php:1.2 --- pear/Selenium/examples/example.php:1.1.1.1 Wed Sep 6 16:08:08 2006 +++ pear/Selenium/examples/example.php Sat Oct 14 17:44:33 2006 @@ -1,8 +1,8 @@ <?php error_reporting(E_ALL|E_STRICT); -require_once 'Selenium.php'; +require_once 'Testing/Selenium.php'; try { - $selenium = new Selenium("*firefox", "http://pear.php.net/"); + $selenium = new Testing_Selenium("*firefox", "http://pear.php.net/"); $result = $selenium->start(); $selenium->open("http://pear.php.net/packages.php"); if ($selenium->getTitle() == "PEAR :: Package Browser :: Top Level") { @@ -28,7 +28,7 @@ /* // To see this example, you need to have Simpletest library. // You can't run simpletest with E_STRICT -require_once 'Selenium.php'; +require_once 'Testing/Selenium.php'; require_once 'simpletest/unit_tester.php'; require_once 'simpletest/reporter.php'; @@ -36,7 +36,7 @@ { function setUp() { - $this->selenium = new Selenium("*firefox", "http://pear.php.net/"); + $this->selenium = new Testing_Selenium("*firefox", "http://pear.php.net/"); $result = $this->selenium->start(); } function tearDown() @@ -60,7 +60,7 @@ /* With PHP_Unit2 // To see this example, you need to have PHPUnit library. error_reporting(E_ALL|E_STRICT); -require_once 'Selenium.php'; +require_once 'Testing/Selenium.php'; require_once 'PHPUnit2/Framework/TestCase.php'; class Example extends PHPUnit2_Framework_TestCase @@ -71,7 +71,7 @@ } function setUp() { - $this->selenium = new Selenium("*firefox", "http://pear.php.net/"); + $this->selenium = new Testing_Selenium("*firefox", "http://pear.php.net/"); // XXX pear does not work E_STRICT because of HTTP_Request // the options are "curl", "pear", "native" // $this->selenium->setDriver("pear"); http://cvs.php.net/viewvc.cgi/pear/Selenium/tests/Bug8891.php?r1=1.1&r2=1.2&diff_format=u Index: pear/Selenium/tests/Bug8891.php diff -u pear/Selenium/tests/Bug8891.php:1.1 pear/Selenium/tests/Bug8891.php:1.2 --- pear/Selenium/tests/Bug8891.php:1.1 Thu Oct 12 17:02:29 2006 +++ pear/Selenium/tests/Bug8891.php Sat Oct 14 17:44:33 2006 @@ -1,5 +1,5 @@ <?php -require_once '../Selenium.php'; +require_once 'Testing/Selenium.php'; require_once 'PHPUnit2/Framework/TestCase.php'; class Bug8891 extends PHPUnit2_Framework_TestCase @@ -16,9 +16,9 @@ public function setUp() { try { - $this->selenium = new Selenium("*firefox", $this->browserUrl); + $this->selenium = new Testing_Selenium("*firefox", $this->browserUrl); $this->selenium->start(); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -28,7 +28,7 @@ { try { $this->selenium->stop(); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { echo $e; } } http://cvs.php.net/viewvc.cgi/pear/Selenium/tests/Bug8893.php?r1=1.1&r2=1.2&diff_format=u Index: pear/Selenium/tests/Bug8893.php diff -u pear/Selenium/tests/Bug8893.php:1.1 pear/Selenium/tests/Bug8893.php:1.2 --- pear/Selenium/tests/Bug8893.php:1.1 Thu Oct 12 17:02:29 2006 +++ pear/Selenium/tests/Bug8893.php Sat Oct 14 17:44:33 2006 @@ -1,5 +1,5 @@ <?php -require_once '../Selenium.php'; +require_once 'Testing/Selenium.php'; require_once 'PHPUnit2/Framework/TestCase.php'; class Bug8893 extends PHPUnit2_Framework_TestCase @@ -16,7 +16,7 @@ public function setUp() { try { - $this->selenium = new Selenium("*firefox", $this->browserUrl); + $this->selenium = new Testing_Selenium("*firefox", $this->browserUrl); $this->selenium->start(); } catch (Selenium_Exception $e) { $this->selenium->stop(); http://cvs.php.net/viewvc.cgi/pear/Selenium/tests/SeleniumTest.php?r1=1.3&r2=1.4&diff_format=u Index: pear/Selenium/tests/SeleniumTest.php diff -u pear/Selenium/tests/SeleniumTest.php:1.3 pear/Selenium/tests/SeleniumTest.php:1.4 --- pear/Selenium/tests/SeleniumTest.php:1.3 Fri Sep 15 16:39:19 2006 +++ pear/Selenium/tests/SeleniumTest.php Sat Oct 14 17:44:33 2006 @@ -3,7 +3,7 @@ // Selenium RC Server is available the following website. // http://openqa.org/selenium-rc/ //error_reporting(E_ALL|E_STRICT); -require_once 'Selenium.php'; +require_once 'Testing/Selenium.php'; require_once 'PHPUnit2/Framework/TestCase.php'; class SeleniumTest extends PHPUnit2_Framework_TestCase @@ -26,12 +26,12 @@ public function setUp() { try { - $this->selenium = new Selenium("*firefox", $this->browserUrl); + $this->selenium = new Testing_Selenium("*firefox", $this->browserUrl); // XXX pear does not work E_STRICT because of HTTP_Request // the options are "curl", "pear", "native" // $this->selenium->setDriver("pear"); $this->selenium->start(); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -41,7 +41,7 @@ { try { $this->selenium->stop(); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { echo $e; } } @@ -57,13 +57,12 @@ $this->selenium->open("{$this->testUrl}/html/test_page.slow.html"); $this->assertEquals("{$this->testUrl}/html/test_page.slow.html", $this->selenium->getLocation()); $this->assertEquals("Slow Loading Page", $this->selenium->getTitle()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } } // }}} -/* // {{{ testClick public function testClick() { @@ -94,7 +93,7 @@ $this->selenium->click("linkWithOnclickReturnsFalse"); $this->assertEquals("Click Page 1", $this->selenium->getTitle()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -123,7 +122,7 @@ $this->selenium->click("enclosedImage"); $this->assertEquals("enclosedImage clicked", $this->selenium->getAlert()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -145,7 +144,7 @@ $this->assertRegExp("/Welcome, TestUser!/", $this->selenium->getText("//h2")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -182,7 +181,7 @@ $this->selenium->select("theSelect", ""); $this->assertEquals("", $this->selenium->getSelectedLabel("theSelect")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -218,7 +217,7 @@ $this->assertEquals(2, count($this->selenium->getSelectedLabels("theSelect"))); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -239,7 +238,7 @@ $this->assertEquals("onsubmit called", $this->selenium->getAlert()); $this->assertEquals("form submitted", $this->selenium->getAlert()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -271,7 +270,7 @@ $this->assertNotEquals("on", $this->selenium->getValue("option-chilli")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -305,7 +304,7 @@ $this->assertEquals("{$this->testUrl}/html/test_select_window_popup.html", $this->selenium->getLocation()); $this->selenium->click("closePage"); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -327,7 +326,7 @@ $this->selenium->type("theText", "javascript{10 * 5}"); $this->assertEquals("50", $this->selenium->getValue("theText")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -363,7 +362,7 @@ $this->selenium->waitForPageToLoad(); $this->assertEquals("Slow Loading Page", $this->selenium->getTitle()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -393,7 +392,7 @@ $this->selenium->close(); $this->selenium->selectWindow("null"); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -445,7 +444,7 @@ $this->assertFalse($this->selenium->isElementPresent("dom=document.links[9]")); $this->assertFalse($this->selenium->isElementPresent("dom=foo")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -468,7 +467,7 @@ $this->assertEquals("banner", $this->selenium->getText("//img[contains(@src, 'banner.gif')]/@alt")); $this->assertEquals("this is the second element", $this->selenium->getText("//body/a[2]")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -495,7 +494,7 @@ $this->selenium->click("//input[@name='name2' and @value='yes']"); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -516,7 +515,7 @@ $this->selenium->waitForPageToLoad(); $this->assertEquals("Click Page 1", $this->selenium->getTitle()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -543,7 +542,7 @@ // $this->selenium->waitForPageToLoad(); // $this->assertNotEquals("Changed the text", $this->selenium->getText("theSpan")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -564,7 +563,7 @@ $this->assertEquals("link clicked", $this->selenium->getAlert()); $this->selenium->click("theButton"); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -583,7 +582,7 @@ $this->selenium->click("theSubmit"); $this->assertEquals("{focus(theSubmit)} {click(theSubmit)} {submit} {blur(theSubmit)}", $this->selenium->getValue("eventlog")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -612,7 +611,7 @@ $this->assertEquals("{focus(theSelect)} {change(theSelect)} {blur(theSelect)}", $this->selenium->getValue("eventlog")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -645,7 +644,7 @@ $this->assertEquals("on", $this->selenium->getValue("theRadio2")); $this->assertEquals("{focus(theRadio2)} {click(theRadio2)} {blur(theRadio2)}", $this->selenium->getValue("eventlog")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -668,7 +667,7 @@ $this->assertEquals("off", $this->selenium->getValue("theCheckbox")); $this->assertEquals("{focus(theCheckbox)} {click(theCheckbox)} {change(theCheckbox)} {blur(theCheckbox)}", $this->selenium->getValue("eventlog")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -691,7 +690,7 @@ $this->assertEquals("changed value", $this->selenium->getValue("theTextbox")); $this->assertEquals("{focus(theTextbox)} {select(theTextbox)} {change(theTextbox)} {blur(theTextbox)}", $this->selenium->getValue("eventlog")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -713,7 +712,7 @@ $this->selenium->type("theTextbox", "changed value"); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -730,7 +729,7 @@ $this->selenium->mouseDown("theButton"); $this->assertEquals("{mouseover(theTextbox)} {mouseover(theButton)} {mousedown(theTextbox)} {mousedown(theButton)}", $this->selenium->getValue("eventlog")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -747,7 +746,7 @@ $this->selenium->keyDown("theTextbox", "98"); $this->assertEquals("{keypress(theTextbox - 119)} {keypress(theTextbox - 115)} {keyup(theTextbox - 44)} {keydown(theTextbox - 98)}", $this->selenium->getValue("eventlog")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -761,7 +760,7 @@ $this->selenium->type("testInput", "test"); $this->assertEquals("Bad value", $this->selenium->getAlert()); $this->selenium->type("testInput", "somethingelse"); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -786,7 +785,7 @@ // $this->assertEquals("I'm Melting! I'm Melting!", $this->selenium->getAlert()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -808,7 +807,7 @@ $this->assertEquals("You are about to go to a dummy page.", $this->selenium->getConfirmation()); $this->assertEquals("Dummy Page", $this->selenium->getTitle()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -832,7 +831,7 @@ $this->assertEquals("Type 'yes' and click OK", $this->selenium->getPrompt()); $this->assertEquals("Dummy Page", $this->selenium->getTitle()); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -853,7 +852,7 @@ $this->assertFalse($this->selenium->isVisible("suppressedSubElement")); $this->assertFalse($this->selenium->isVisible("jsHiddenParagraph")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -869,7 +868,7 @@ $this->assertFalse($this->selenium->isEditable("disabled_text")); $this->assertFalse($this->selenium->isEditable("disabled_select")); - } catch (Selenium_Exception $e) { + } catch (Testing_Selenium_Exception $e) { $this->selenium->stop(); echo $e; } @@ -887,6 +886,7 @@ // public function testCommandError // {} // }}} +/* */ } ?>