From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
OOjs UI icon advanced.svg
Release status: beta
Implementation Tag , Special page
Description Provide a selenium tag and special page interface to selenium-core
Author(s) User:Zven
Latest version 0.8.4 (2008-01-10)
MediaWiki 1.12.0+
License GPL
Example Selenium example
Translate the Selenium extension if it is available at translatewiki.net
Check usage and version matrix.

Selenium is an extension which provides a tag <selenium> that encapsulates any selenium tests. For example, tests generated using selenium-ide (an extension available for the Firefox web browser). This allows mediawiki to act as a repository for maintaining selenium tests in articles. A wiki article that is a single selenium test is distinctly different from an article which contains a suite of selenium tests separated by section headings (==Section 1== etc).

This extension comes bundled with selenium-core (version 0.8.3), a test tool for web applications. The extension provides a special page (Special:Selenium) as an interface to allow a suite of selenium tests provided within an article to be parsed and run with selenium-core on the same server. When an article contains a selenium tag, it is automatically categorized into Category:Selenium. The Special page Special:Selenium provides a drop down list of selenium test suites to run using selenium-core.

This allows client side testing and validation of content on the server that the extension is installed on. For example, selenium-ide tests could be written to prove that a certain extension has been installed by checking for extension credits in Special:Version, and generate some content in the Sandbox that illustrates functionality and checks returned output for certain expected criteria. The Selenium-core environment will determine which tests have passed or failed.


Download the file Selenium.zip and unpack it in;


The structure should be as follows;


To enable the extension add the following line into your LocalSettings.php.


Check the extension is installed at Special:Version on your wiki site.

Alternatively you can separately download selenium-core-0 and the extension file Selenium.php and recreate the directory structure above.


The <selenium> tag encapsulates an entire generated selenium-ide test without having to remove any of the generated tag content. Adding the following CSS code to MediaWiki:Common.css will configure the displayed tables to look like selenium tests within wiki articles

div.selenium table {
border:1px solid #CCCCCC;
Orginal website for Selenium is 

Known issues[edit]

  • Parameters are not expanded in transcluded articles.
  • If <selenium> tags encapsulate multiple tests within a single section heading, only the first selenium tags within section headings are used to generate a suite used by the special page.
  • Currently there is no logging of users who run a selenium-core suite from a wiki article.

See also[edit]