Tina4Stack  v1.0.1
The Tina4 Stack
Tessa Class Reference

Public Member Functions

 __construct ($testDir="test", $browser="firefox", $testServer="")
 
 doTesting ()
 
 get_func_argNames ($funcName)
 
 runTests ()
 
 __call ($method, $args)
 
 message ($msg)
 
 checkDB ($tablename, $fieldname, $value)
 
 fetchRecords ($sql)
 
 fetchRecord ($sql)
 
 tryingTo ($msg)
 
 IWantTo ($msg)
 
 addAlias ($name, $element)
 
 clickOn ($id)
 
 lookFor ($id)
 
 getAlias ($name)
 
 byId ($id)
 
 byPath ($path)
 
 byClass ($class)
 
 byCSS ($css)
 
 waitFor ($id)
 
 equals ($test1, $test2)
 
 failed ($message)
 
 screenShot ()
 
 IsDifferent ($test1, $test2)
 
 openSite ($URL)
 
 navigateTo ($URL, $maximize=false)
 
 newSession ()
 
 getActions ()
 
 deleteAllCookies ()
 
 acceptAlert ()
 
 dismissAlert ()
 
 executeJavaScript ($script, $args)
 

Detailed Description

Class Tessa

Constructor & Destructor Documentation

Tessa::__construct (   $testDir = "test",
  $browser = "firefox",
  $testServer = "" 
)
Parameters
string$testDir
string$browser
string$testServer

Member Function Documentation

Tessa::__call (   $method,
  $args 
)
Parameters
$method
$args
Returns
mixed
Tessa::acceptAlert ( )

Accept popup

Tessa::addAlias (   $name,
  $element 
)
Parameters
$name
$element
Tessa::byClass (   $class)
Parameters
$class
Returns
TestELement
Tessa::byCSS (   $css)
Parameters
$css
Returns
TestELement
Tessa::byId (   $id)
Parameters
$id
Returns
TestELement
Tessa::byPath (   $path)
Parameters
$path
Returns
TestELement
Tessa::checkDB (   $tablename,
  $fieldname,
  $value 
)

Retrieves a record from the database based on the table, fieldname and value

Parameters
String$tablenameThe name of the table
String$fieldnameThe name of the field
String$valueThe expected value
Returns
Object
Tessa::clickOn (   $id)
Parameters
$id
Tessa::deleteAllCookies ( )
Tessa::dismissAlert ( )

Dismiss popup

Tessa::doTesting ( )
Tessa::equals (   $test1,
  $test2 
)
Parameters
$test1
$test2
Tessa::executeJavaScript (   $script,
  $args 
)

Execute JS

Tessa::failed (   $message)
Parameters
$message
Tessa::fetchRecord (   $sql)

Function to retrieve a record from the database

Parameters
String$sql
Returns
Object
Tessa::fetchRecords (   $sql)

Function to retrieve records from the database

Parameters
String$sql
Returns
Object
Tessa::get_func_argNames (   $funcName)
Parameters
$funcName
Returns
array
Tessa::getActions ( )
Returns
PHPWebDriver_WebDriverActionChains
Tessa::getAlias (   $name)
Parameters
$name
Returns
null
Tessa::IsDifferent (   $test1,
  $test2 
)

Reuben — Check if two test cases are different

Parameters
$test1
$test2
Tessa::IWantTo (   $msg)

Display a message on the screen prefixed with I want to

Parameters
$msg
Tessa::lookFor (   $id)
Parameters
$id
Returns
null|TestELement
Tessa::message (   $msg)

Display a message on the screen

Parameters
$msg
Tessa::navigateTo (   $URL,
  $maximize = false 
)
Parameters
$URL
Returns
bool
Tessa::newSession ( )
Tessa::openSite (   $URL)
Parameters
$URL
Returns
bool
Tessa::runTests ( )
Tessa::screenShot ( )

A function to create screenshots when something fails

Returns
String The HTML path to the screen shot
Tessa::tryingTo (   $msg)

Display a message on the screen prefixed with Trying to

Parameters
$msg
Tessa::waitFor (   $id)
Parameters
$id
Returns
TestELement

The documentation for this class was generated from the following file: