PHP Class PMA_SeleniumBase, phpmyadmin

Inheritance: extends PHPUnit_Extensions_Selenium2TestCase
Afficher le fichier Open project: phpmyadmin/phpmyadmin Class Usage Examples

Méthodes publiques

Свойство Type Description
$database_name string Name of database for the test

Méthodes publiques

Méthode Description
alertText ( ) : mixed Wrapper around alertText method to not use it on not supported browsers.
browsers ( ) : Array Lists browsers to test
dbQuery ( string $query ) : void | boolean | mysqli_result Executes a database query
expandMore ( ) : void Kills the More link in the menu
getCellByTableClass ( string $tableClass, integer $row, integer $column ) : text Get table cell data by the class attribute of the table
getCellByTableId ( string $tableID, integer $row, integer $column ) : text Get table cell data by the ID of the table
gotoHomepage ( ) : void Used to go to the homepage
isElementPresent ( string $func, string $arg ) : boolean Check if element is present or not
isLoggedIn ( ) : boolean Check if user is logged in to phpmyadmin
isSuccessLogin ( ) : boolean Checks whether the login is successful
isUnsuccessLogin ( ) : boolean Checks whether the login is unsuccessful
keys ( string $text ) : void Wrapper around keys method to not use it on not supported browsers.
logOutIfLoggedIn ( ) : void Perform a logout, if logged in
login ( string $username = '', string $password = '' ) : void perform a login
moveto ( object $element ) : void Wrapper around moveto method to not use it on not supported browsers.
navigateTable ( string $table ) : void Navigates browser to a table page.
sleep ( ) : void Sleeps while waiting for browser to perform an action.
tearDown ( ) : void Tear Down function for test cases
typeInTextArea ( string $text ) : void Type text in textarea (CodeMirror enabled)
waitForElement ( string $func, string $arg ) : PHPUnit_Extensions_Selenium2TestCase_Element Wait for an element to be present on the page
waitForElementNotPresent ( string $func, string $arg ) : boolean Wait for an element to disappear

Méthodes protégées

Méthode Description
isSuperUser ( ) : boolean Checks whether user is a superuser.
setUp ( ) : void Configures the selenium and database link.
skipIfNotPMADB ( ) : void Skips test if pmadb is not configured.
skipIfNotSuperUser ( ) : void Skips test if test user is not a superuser.

Method Details

alertText() public méthode

Wrapper around alertText method to not use it on not supported browsers.
public alertText ( ) : mixed
Résultat mixed

browsers() public static méthode

Lists browsers to test
public static browsers ( ) : Array
Résultat Array of browsers to test

dbQuery() public méthode

Executes a database query
public dbQuery ( string $query ) : void | boolean | mysqli_result
$query string SQL Query to be executed
Résultat void | boolean | mysqli_result

expandMore() public méthode

Kills the More link in the menu
public expandMore ( ) : void
Résultat void

getCellByTableClass() public méthode

Get table cell data by the class attribute of the table
public getCellByTableClass ( string $tableClass, integer $row, integer $column ) : text
$tableClass string Class of the table
$row integer Table row
$column integer Table column
Résultat text Data from the particular table cell

getCellByTableId() public méthode

Get table cell data by the ID of the table
public getCellByTableId ( string $tableID, integer $row, integer $column ) : text
$tableID string Table identifier
$row integer Table row
$column integer Table column
Résultat text Data from the particular table cell

gotoHomepage() public méthode

Used to go to the homepage
public gotoHomepage ( ) : void
Résultat void

isElementPresent() public méthode

Check if element is present or not
public isElementPresent ( string $func, string $arg ) : boolean
$func string Locate using - byCss, byXPath, etc
$arg string Selector
Résultat boolean Whether or not the element is present

isLoggedIn() public méthode

Check if user is logged in to phpmyadmin
public isLoggedIn ( ) : boolean
Résultat boolean Where or not user is logged in

isSuccessLogin() public méthode

Checks whether the login is successful
public isSuccessLogin ( ) : boolean
Résultat boolean

isSuperUser() protected méthode

Checks whether user is a superuser.
protected isSuperUser ( ) : boolean
Résultat boolean

isUnsuccessLogin() public méthode

Checks whether the login is unsuccessful
public isUnsuccessLogin ( ) : boolean
Résultat boolean

keys() public méthode

Wrapper around keys method to not use it on not supported browsers.
public keys ( string $text ) : void
$text string Keys to send
Résultat void

logOutIfLoggedIn() public méthode

Perform a logout, if logged in
public logOutIfLoggedIn ( ) : void
Résultat void

login() public méthode

perform a login
public login ( string $username = '', string $password = '' ) : void
$username string Username
$password string Password
Résultat void

moveto() public méthode

Wrapper around moveto method to not use it on not supported browsers.
public moveto ( object $element ) : void
$element object element
Résultat void

navigateTable() public méthode

Navigates browser to a table page.
public navigateTable ( string $table ) : void
$table string Name of table
Résultat void

setUp() protected méthode

Configures the selenium and database link.
protected setUp ( ) : void
Résultat void

skipIfNotPMADB() protected méthode

Skips test if pmadb is not configured.
protected skipIfNotPMADB ( ) : void
Résultat void

skipIfNotSuperUser() protected méthode

Skips test if test user is not a superuser.
protected skipIfNotSuperUser ( ) : void
Résultat void

sleep() public méthode

Sleeps while waiting for browser to perform an action.
public sleep ( ) : void
Résultat void

tearDown() public méthode

Tear Down function for test cases
public tearDown ( ) : void
Résultat void

typeInTextArea() public méthode

Type text in textarea (CodeMirror enabled)
public typeInTextArea ( string $text ) : void
$text string Text to type
Résultat void

waitForElement() public méthode

Wait for an element to be present on the page
public waitForElement ( string $func, string $arg ) : PHPUnit_Extensions_Selenium2TestCase_Element
$func string Locate using - byCss, byXPath, etc
$arg string Selector
Résultat PHPUnit_Extensions_Selenium2TestCase_Element Element waited for

waitForElementNotPresent() public méthode

Wait for an element to disappear
public waitForElementNotPresent ( string $func, string $arg ) : boolean
$func string Locate using - byCss, byXPath, etc
$arg string Selector
Résultat boolean Whether or not the element disappeared

Property Details

$database_name public_oe property

Name of database for the test
public string $database_name
Résultat string