![]() |
Tina4Stack
v1.0.1
The Tina4 Stack
|
Classes | |
class | Tessa |
class | TestElement |
Functions | |
tessaErrorHandler ($errno, $errstr, $errfile, $errline) | |
message ($msg) | |
tryingTo ($msg) | |
IWantTo ($msg) | |
IExpectToSee ($text) | |
ISee ($text) | |
WaitFor2Seconds () | |
WaitFor1Second () | |
byId ($id) | |
LookFor ($id) | |
ClickOn ($id) | |
byCSS ($css) | |
byClass ($class) | |
byPath ($path) | |
waitFor ($id) | |
checkDB ($tablename, $fieldname, $value) | |
fetchRecords ($sql) | |
fetchRecord ($sql) | |
screenShot () | |
equals ($test1, $test2) | |
IsDifferent ($test1, $test2) | |
openSite ($URL) | |
navigateTo ($URL) | |
getActions () | |
deleteAllCookies () | |
AcceptAlert () | |
DismissAlert () | |
ExecJS ($script, $args=array()) | |
Variables | |
global | $TESSA |
AcceptAlert | ( | ) |
Accept Popup
byClass | ( | $class | ) |
string | $class | The class name of the HTML element we are looking for |
byCSS | ( | $css | ) |
Find an element by its CSS tag and return a TestElement object
string | $css | The CSS path of the HTML element we are looking for |
byId | ( | $id | ) |
Find an element by its ID on the page, returns a TestElement object
string | $id | The ID of the html element, see <tag id="{id}"></tag> |
byPath | ( | $path | ) |
$path |
checkDB | ( | $tablename, | |
$fieldname, | |||
$value | |||
) |
string | $tablename | The name of the table to check in the database |
string | $fieldname | The name of the field to reference |
string | $value | The value expected for that field |
ClickOn | ( | $id | ) |
Using the lookFor function this function calls the click event on the found element.
string | $id | The id, path or css of the element we are looking to click on |
deleteAllCookies | ( | ) |
DismissAlert | ( | ) |
Dismiss Popup
equals | ( | $test1, | |
$test2 | |||
) |
$test1 | |
$test2 |
ExecJS | ( | $script, | |
$args = array() |
|||
) |
Execute JS
$script | $args |
fetchRecord | ( | $sql | ) |
Function to retrieve a record from the database
String | $sql |
fetchRecords | ( | $sql | ) |
Function to retrieve records from the database
String | $sql |
getActions | ( | ) |
IExpectToSee | ( | $text | ) |
A function which tests if a certain text string is on the screen, if its not there the function will kill the test process.
string | $text | The text you wish to see on the screen |
IsDifferent | ( | $test1, | |
$test2 | |||
) |
$test1 | |
$test2 |
ISee | ( | $text | ) |
A function which checks if a certain string is on the screen and returns true or false, this is to be used in an if statement Example:
if (ISee("Home")) { .... } else { .... }
string | $text | The text you want to see on the screen |
IWantTo | ( | $msg | ) |
Outputs a message prefixed with I want to
string | $msg | The message you want to be displayed |
LookFor | ( | $id | ) |
Find an element by ID, Path or Class, if all these fail the function causes the test process to fail
string | $id | The id, path or class of the element we are looking for. |
message | ( | $msg | ) |
Displays a message on the screen
string | $msg | The message you want displayed. |
navigateTo | ( | $URL | ) |
type $TESSA
type | $URL |
openSite | ( | $URL | ) |
$URL |
screenShot | ( | ) |
Creates a screen shot of the page where the error occured
tessaErrorHandler | ( | $errno, | |
$errstr, | |||
$errfile, | |||
$errline | |||
) |
tryingTo | ( | $msg | ) |
Outputs a message prefixed with Trying to
string | $text | The message you want displayed |
waitFor | ( | $id | ) |
string | $id | The ID of the HTML element we are expecting |
WaitFor1Second | ( | ) |
A function that waits for 1 seconds
WaitFor2Seconds | ( | ) |
A function that waits for 2 seconds
global $TESSA |
Created by PhpStorm. User: andrevanzuydam Date: 4/13/2015 Time: 1:14 PM