From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 12 Aug 2013 09:28:15 +0200 Subject: Update to MediaWiki 1.21.1 --- tests/selenium/Selenium.php | 190 -------------------------------------------- 1 file changed, 190 deletions(-) delete mode 100644 tests/selenium/Selenium.php (limited to 'tests/selenium/Selenium.php') diff --git a/tests/selenium/Selenium.php b/tests/selenium/Selenium.php deleted file mode 100644 index ecf7f9ec..00000000 --- a/tests/selenium/Selenium.php +++ /dev/null @@ -1,190 +0,0 @@ -tester = new Testing_Selenium( $this->browser, self::$url, $this->host, - $this->port, $this->timeout ); - if ( method_exists( $this->tester, "setVerbose" ) ) $this->tester->setVerbose( $this->verbose ); - - $this->tester->start(); - $this->isStarted = true; - } - - public function stop() { - $this->tester->stop(); - $this->tester = null; - $this->isStarted = false; - } - - public function login() { - if ( strlen( $this->user ) == 0 ) { - return; - } - $this->open( self::$url . '/index.php?title=Special:Userlogin' ); - $this->type( 'wpName1', $this->user ); - $this->type( 'wpPassword1', $this->pass ); - $this->click( "//input[@id='wpLoginAttempt']" ); - $this->waitForPageToLoad( 10000 ); - - // after login we redirect to the main page. So check whether the "Prefernces" top menu item exists - $value = $this->isElementPresent( "//li[@id='pt-preferences']" ); - - if ( $value != true ) { - throw new Testing_Selenium_Exception( "Login Failed" ); - } - - } - - public static function getInstance() { - if ( null === self::$_instance ) { - throw new MWException( "No instance set yet" ); - } - - return self::$_instance; - } - - public function loadPage( $title, $action ) { - $this->open( self::$url . '/index.php?title=' . $title . '&action=' . $action ); - } - - public function setLogger( $logger ) { - $this->logger = $logger; - } - - public function getLogger( ) { - return $this->logger; - } - - public function log( $message ) { - $this->logger->write( $message ); - } - - public function setUrl( $url ) { - self::$url = $url; - } - - static public function getUrl() { - return self::$url; - } - - public function setPort( $port ) { - $this->port = $port; - } - - public function getPort() { - return $this->port; - } - - public function setUser( $user ) { - $this->user = $user; - } - - // Function to get username - public function getUser() { - return $this->user; - } - - - public function setPass( $pass ) { - $this->pass = $pass; - } - - //add function to get password - public function getPass( ) { - return $this->pass; - } - - - public function setHost( $host ) { - $this->host = $host; - } - - public function setVerbose( $verbose ) { - $this->verbose = $verbose; - } - - public function setAvailableBrowsers( $availableBrowsers ) { - $this->browsers = $availableBrowsers; - } - - public function setJUnitLogfile( $junitlogfile ) { - $this->junitlogfile = $junitlogfile; - } - - public function getJUnitLogfile( ) { - return $this->junitlogfile; - } - - public function setRunAgainstGrid( $runagainstgrid ) { - $this->runagainstgrid = $runagainstgrid; - } - - public function setBrowser( $b ) { - if ($this->runagainstgrid) { - $this->browser = $b; - return true; - } - if ( !isset( $this->browsers[$b] ) ) { - throw new MWException( "Invalid Browser: $b.\n" ); - } - - $this->browser = $this->browsers[$b]; - } - - public function getAvailableBrowsers() { - return $this->browsers; - } - - public function __call( $name, $args ) { - $t = call_user_func_array( array( $this->tester, $name ), $args ); - return $t; - } - - // Prevent external cloning - protected function __clone() { } - // Prevent external construction - // protected function __construct() {} -} -- cgit v1.2.3-54-g00ecf