Methods summary
public
|
|
public
Azalea\Selenium\Toolkit\TestCase
|
#
getDriver( )
Get the active web driver.
Get the active web driver.
Returns
|
public
|
#
setRoot( string $root )
Sets the root element's selector.
Sets the root element's selector.
Parameters
Returns
$this
|
public
string
|
#
getRoot( )
Get the root element's selector.
Get the root element's selector.
Returns
string
|
public
PHPUnit_Extensions_Selenium2TestCase_Element
|
#
root( )
Get the active root element.
Get the active root element.
Returns
PHPUnit_Extensions_Selenium2TestCase_Element
|
public
Azalea\Selenium\Toolkit\Dom
|
#
filter( string $selector )
Filter down to a sub-element and returns a new dom instance.
Filter down to a sub-element and returns a new dom instance.
Parameters
Returns
|
public
|
#
assertElementExists( string $selector )
Asserts if an element matching the given selector does not exist.
Asserts if an element matching the given selector does not exist.
Parameters
Returns
$this
|
public
|
#
assertElementNotExists( string $selector )
Asserts if an element matching the given selector does exist.
Asserts if an element matching the given selector does exist.
Parameters
Returns
$this
|
public
|
#
assertElementVisible( string $selector )
Asserts if an element matching the given selector is not visible.
Asserts if an element matching the given selector is not visible.
Parameters
Returns
$this
|
public
|
#
assertElementNotVisible( string $selector )
Asserts if an element matching the given selector is visible.
Asserts if an element matching the given selector is visible.
Parameters
Returns
$this
|
public
|
#
assertElementHasText( string $selector, string $matches )
Asserts if an element matching the given selector does not contain
the given text.
Asserts if an element matching the given selector does not contain
the given text.
Parameters
Returns
$this
|
public
|
#
assertElementHasTextNoCase( string $selector, string $matches )
Asserts if an element matching the given selector does not contain
the given text - case insensitive.
Asserts if an element matching the given selector does not contain
the given text - case insensitive.
Parameters
Returns
$this
|
public
|
#
assertElementNotHasText( string $selector, $matches )
Asserts if an element matching the given selector does contain
the given text.
Asserts if an element matching the given selector does contain
the given text.
Parameters
Returns
$this
|
public
|
#
assertElementEmpty( string $selector, string $matches,… )
Asserts if an element matching the given selector contains any text.
Asserts if an element matching the given selector contains any text.
Parameters
Returns
$this
|
public
|
#
assertNotElementEmpty( string $selector, string $matches,… )
Asserts if an element matching the given selector does not contain
any text.
Asserts if an element matching the given selector does not contain
any text.
Parameters
Returns
$this
|
public
|
#
assertCanSee( string $text )
Asserts if the given text is not visible anywhere in the page
or scoped by the given selector.
Asserts if the given text is not visible anywhere in the page
or scoped by the given selector.
Parameters
Returns
$this
|
public
|
#
assertCanNotSee( string $text )
Asserts if the given text is visible anywhere in the page
or scoped by the given selector.
Asserts if the given text is visible anywhere in the page
or scoped by the given selector.
Parameters
Returns
$this
|
public
|
#
assertInputEnabled( string $name )
Asserts if the input element given by name attribute $name is not
enabled (element.disabled = false).
Asserts if the input element given by name attribute $name is not
enabled (element.disabled = false).
Parameters
Returns
$this
|
public
|
#
assertInputDisabled( string $name )
Asserts if the input element given by name attribute $name is not
disabled (element.disabled = true).
Asserts if the input element given by name attribute $name is not
disabled (element.disabled = true).
Parameters
Returns
$this
|
public
|
#
assertInputValueEquals( string $name, $text )
Asserts if the input element given by name attribute $name does not
equal the given text (checkboxes and radio buttons will always assert).
For
Asserts if the input element given by name attribute $name does not
equal the given text (checkboxes and radio buttons will always assert).
For
Parameters
Returns
$this
|
public
|
#
assertInputHasValue( string $name )
Asserts if the input element given by name attribute $name does not
contain any text (checkboxes and radio buttons will always assert).
For
Asserts if the input element given by name attribute $name does not
contain any text (checkboxes and radio buttons will always assert).
For
Parameters
Returns
$this
|
public
|
#
assertNotInputHasValue( string $name )
Asserts if the input element given by name attribute $name
contains any text (checkboxes and radio buttons will always assert).
For
Asserts if the input element given by name attribute $name
contains any text (checkboxes and radio buttons will always assert).
For
Parameters
Returns
$this
|
public
PHPUnit_Extensions_Selenium2TestCase_Element
|
#
getElementById( string $id )
Returns the element matching the given Id.
Returns the element matching the given Id.
Parameters
Returns
PHPUnit_Extensions_Selenium2TestCase_Element
|
public
PHPUnit_Extensions_Selenium2TestCase_Element
|
#
querySelector( string $css )
Returns the element matching the given css selector.
Returns the element matching the given css selector.
Parameters
Returns
PHPUnit_Extensions_Selenium2TestCase_Element
|
public
array
|
#
querySelectorAll( string $css )
Returns all elements that match the given css selector.
Returns all elements that match the given css selector.
Parameters
Returns
array
|
public
PHPUnit_Extensions_Selenium2TestCase_Element
|
#
queryXPath( string $css )
Returns the element matching the given xpath selector.
Returns the element matching the given xpath selector.
Parameters
Returns
PHPUnit_Extensions_Selenium2TestCase_Element
|
public
array
|
#
queryXPathAll( string $xpath )
Returns all elements that match the given xpath.
Returns all elements that match the given xpath.
Parameters
Returns
array
|
public
array
|
#
getLinks( string $text, string $scope,… )
Finds all links with the given text.
Finds all links with the given text.
Parameters
Returns
array
|
public
array
|
|
public
PHPUnit_Extensions_Selenium2TestCase_Element
|
#
getFirstVisible( string $selector )
Get the first visible element matching the given selector
Get the first visible element matching the given selector
Parameters
Returns
PHPUnit_Extensions_Selenium2TestCase_Element
Throws
|
public
boolean
|
#
hasElement( string $css )
Returns true if elements matching the given css selectors
exists.
Returns true if elements matching the given css selectors
exists.
Parameters
Returns
boolean
|
public
boolean
|
#
see( string $text, string $scope,… )
Returns true if the given text is visible somewhere on the screen.
Returns true if the given text is visible somewhere on the screen.
Parameters
Returns
boolean
|
public
boolean
|
#
canSeeElement( string $css )
Returns true if an element matching the given css selector
exists and is visually displayed (not display:none).
Returns true if an element matching the given css selector
exists and is visually displayed (not display:none).
Parameters
Returns
boolean
|
public
|
#
click( string $text )
Clicks a link with the given text.
Clicks a link with the given text.
Parameters
Returns
$this
|
public
|
#
clickElement( string $selector )
Uses JavaScript to simulate a mouse click.
Uses JavaScript to simulate a mouse click.
This should only be used if there are issues with the selenium web
driver's element click command.
Parameters
Returns
$this
|
public
|
#
press( string $text, $index = 0 )
|
public
|
#
tab( )
Tabs away from the active element.
Tabs away from the active element.
Returns
$this
|
public
|
#
type( string $name, string $text )
Type text into an input element with the given name attribute.
Type text into an input element with the given name attribute.
Parameters
Returns
$this
|
public
|
#
check( string $name )
Checks a checkbox / radio input with the given name attribute.
Checks a checkbox / radio input with the given name attribute.
Parameters
Returns
$this
|
public
|
#
uncheck( string $name )
Checks a checkbox / radio input with the given name attribute.
Checks a checkbox / radio input with the given name attribute.
Parameters
Returns
$this
|
public
|
#
select( string $name, string $value )
Sets the value of a
Sets the value of a
Parameters
Returns
$this
|
public
|
#
radio( string $name, string $value )
Set the value of a radio group with the given name attribute.
Set the value of a radio group with the given name attribute.
Parameters
Returns
$this
|
public
mixed
|
#
getInput( string $name )
Retrieves an input's value by name attribute.
Retrieves an input's value by name attribute.
If it is a checkbox or radio button then this will return
a boolean true or false.
Parameters
Returns
mixed
|
public
PHPUnit_Extensions_Selenium2TestCase_Element
|
#
getInputElement( string $name )
Retrieves an input element by name attribute.
Retrieves an input element by name attribute.
Parameters
Returns
PHPUnit_Extensions_Selenium2TestCase_Element
|
public
PHPUnit_Extensions_Selenium2TestCase_Element
|
#
getSelectOptionText( string $name, $value )
Retrieves the option text of the given select element for the
given value.
Retrieves the option text of the given select element for the
given value.
Parameters
Returns
PHPUnit_Extensions_Selenium2TestCase_Element
|
public
|
#
setInput( array $name, $value = null )
Set an input with the given name to the given value. Can accept
an array of name => value pairs.
Set an input with the given name to the given value. Can accept
an array of name => value pairs.
Keys are the input's name attribute.
For checkboxes and radio buttons use boolean true / false values.
The inputs are also stored locally in the Form view so that you
can reference them later without going back to the DOM.
Parameters
Returns
$this
|
public
|
#
setHiddenInput( string $name, string $value )
Sets the value of a hidden input element by name attribute.
Sets the value of a hidden input element by name attribute.
Parameters
Returns
$this
|
public
|
#
clearInput( string $name )
Clears an input element by name attribute.
Clears an input element by name attribute.
Parameters
Returns
$this
|
public
|
#
focusInput( string $name )
Gives focus to the input element with the give name.
Gives focus to the input element with the give name.
Parameters
Returns
$this
|
public
Azalea\Selenium\Toolkit\Components\Form
|
#
submit( )
Submits the form if an input[submit] or button[submit] element is found.
Submits the form if an input[submit] or button[submit] element is found.
Returns
Azalea\Selenium\Toolkit\Components\Form
|
public
mixed
|
#
javascript( string $script, array $args = array() )
Executes JavaScript in the browser.
Executes JavaScript in the browser.
Parameters
Returns
mixed
|
public
string
|
#
getCurrentHash( )
Gets the current window location's hash value.
Gets the current window location's hash value.
Returns
string
|
public
|
#
updateHash( string $hash )
Updates the hash fragment in the browser's url.
Updates the hash fragment in the browser's url.
Parameters
Returns
$this
|
public
PHPUnit_Extensions_Selenium2TestCase_Element
|
#
waitFor( string $selector, integer $timeout = 30 )
Wait for an element with the given selector to appear in the dom, then
return that element.
Wait for an element with the given selector to appear in the dom, then
return that element.
Parameters
Returns
PHPUnit_Extensions_Selenium2TestCase_Element
|
public
PHPUnit_Extensions_Selenium2TestCase_Element
|
#
waitForElementVisible( string $selector, integer $timeout = 30 )
Wait for an element with the given selector to be visible in the dom, then
return that element.
Wait for an element with the given selector to be visible in the dom, then
return that element.
Parameters
Returns
PHPUnit_Extensions_Selenium2TestCase_Element
|
public
PHPUnit_Extensions_Selenium2TestCase_Element
|
#
waitForElementText( string $selector, integer $text, $timeout = 30 )
Wait for an element with the given selector to contain the given text,
then return that element.
Wait for an element with the given selector to contain the given text,
then return that element.
Parameters
- $selector
- $text
- $timeout
- $timeout
Returns
PHPUnit_Extensions_Selenium2TestCase_Element
|