cvs: pear /Testing_Selenium Selenium.php

From: Date: Tue, 31 Oct 2006 00:24:48 +0000
Subject: cvs: pear /Testing_Selenium Selenium.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-42905@lists.php.net to get a copy of this message
shin Tue Oct 31 00:24:48 2006 UTC Modified files: /pear/Testing_Selenium Selenium.php Log: Fixed Bug #9189, Added Req #9120 http://cvs.php.net/viewvc.cgi/pear/Testing_Selenium/Selenium.php?r1=1.5&r2=1.6&diff_format=u Index: pear/Testing_Selenium/Selenium.php diff -u pear/Testing_Selenium/Selenium.php:1.5 pear/Testing_Selenium/Selenium.php:1.6 --- pear/Testing_Selenium/Selenium.php:1.5 Sat Oct 14 17:44:33 2006 +++ pear/Testing_Selenium/Selenium.php Tue Oct 31 00:24:48 2006 @@ -32,9 +32,8 @@ * @package Testing_Selenium * @author Shin Ohno <ganchiku@gmail.com> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version 0.2.0 + * @version @package_version@ * @see http://www.openqa.org/selenium-rc/ - * @since 0.2.0 */ /** @@ -46,7 +45,7 @@ * Selenium * * @package Testing_Selenium - * @version 0.2.0 + * @version @package_version@ * @author Shin Ohno <ganchiku@gmail.com> */ class Testing_Selenium @@ -140,13 +139,16 @@ /** * Run the browser and set session id. * + * @param string $sessionId * @access public * @return string on success * @throws Testing_Selenium_Exception */ - public function start() + public function start($sessionId = null) { - $this->sessionId = $this->getString('getNewBrowserSession', array($this->browser, $this->browserUrl)); + if (is_null($sessionId)) { + $this->sessionId = $this->getString('getNewBrowserSession', array($this->browser, $this->browserUrl)); + } return $this->sessionId; } // }}} @@ -1181,10 +1183,10 @@ */ private function doCommand($verb, $args = array()) { - $url = sprintf('http://%s:%s/selenium-server/driver/?cmd=%s', $this->host, $this->port, htmlspecialchars($verb)); + $url = sprintf('http://%s:%s/selenium-server/driver/?cmd=%s', $this->host, $this->port, urlencode($verb)); for ($i = 0; $i < count($args); $i++) { $argNum = strval($i + 1); - $url .= sprintf('&%s=%s', $argNum, htmlspecialchars($args[$i])); + $url .= sprintf('&%s=%s', $argNum, urlencode(trim($args[$i]))); } if (isset($this->sessionId)) {

« previous php.pear.cvs (#42905) next »