Overview

Namespaces

  • Azalea
    • Selenium
      • App
        • Charts
        • Components
        • Encounters
        • Home
        • Login
        • Main
        • Messages
        • Patients
        • Scheduler
      • Core
      • EHR
        • UI
          • Charts
          • Documents
          • Encounters
          • Home
          • Messaging
            • Folders
          • Patients
          • Payments
          • Precerts
          • Reports
          • Scheduler
          • Settings
            • General
              • Locations
              • Roles
              • Users
        • User
      • Login
        • UI
      • PHR
        • UI
        • User
      • Toolkit
        • Exception
        • Validation
    • Util
  • None
  • tests
    • integration
      • barebones
        • controllers
          • charts
          • patients
          • system
        • models
          • billing
          • encounters
          • examples
          • messaging
          • rcm
          • system
    • unit
      • barebones
        • lib
        • utilities
          • calculations

Classes

  • Dom
  • NestedHashMap
  • ResourceLoader
  • SauceLabsTestCase
  • SeleniumTestCase
  • TestCase
  • View
  • Overview
  • Namespace
  • Class

Class Dom

Namespace: Azalea\Selenium\Toolkit
Located at selenium/Toolkit/Dom.php
Methods summary
public
# __construct( Azalea\Selenium\Toolkit\TestCase $driver, $root = "body" )

Parameters

$driver
$root

Throws

InvalidArgumentException
public Azalea\Selenium\Toolkit\TestCase
# getDriver( )

Get the active web driver.

Get the active web driver.

Returns

Azalea\Selenium\Toolkit\TestCase
public
# setRoot( string $root )

Sets the root element's selector.

Sets the root element's selector.

Parameters

$root

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

$selector

Returns

Azalea\Selenium\Toolkit\Dom
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

$selector

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

$selector

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

$selector

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

$selector

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

$selector
$matches

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

$selector
$matches

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

$selector
$matches

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

$selector
$matches,…

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

$selector
$matches,…

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

$text

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

$text

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

$name

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

$name

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 elements it will assert if the selection value does not equal the given text (element.value = "").

Parameters

$name
$text

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 elements it will assert if there is no selection (element.value = "").

Parameters

$name

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 elements it will assert if there is a selection (element.value = "").

Parameters

$name

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

$id

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

$css

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

$css

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

$css

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

$xpath

Returns

array
public array
# getLinks( string $text, string $scope,… )

Finds all links with the given text.

Finds all links with the given text.

Parameters

$text
$scope,…

Returns

array
public array
# getButtons( string $text, string $scope,… )

Finds all buttons with the given text. Searches for

Finds all buttons with the given text. Searches for

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

$selector

Returns

PHPUnit_Extensions_Selenium2TestCase_Element

Throws

Azalea\Selenium\Toolkit\Exception\ElementNotFoundException
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

$css

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

$text
$scope,…

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

$css

Returns

boolean
public
# click( string $text )

Clicks a link with the given text.

Clicks a link with the given text.

Parameters

$text

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

$selector

Returns


$this
public
# press( string $text, $index = 0 )

Presses a

Presses a

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

$name
$text

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

$name

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

$name

Returns


$this
public
# select( string $name, string $value )

Sets the value of a element by name attribute.

Parameters

$name
$value

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

$name
$value

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

$name

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

$name

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

$name
$value

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

$name
$inputs
$value

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

$name
$value

Returns


$this
public
# clearInput( string $name )

Clears an input element by name attribute.

Clears an input element by name attribute.

Parameters

$name

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

$name

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

$script
$args

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

$hash

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

$selector
$timeout

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

$selector
$timeout

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
Properties summary
protected Azalea\Selenium\Toolkit\TestCase $driver

$driver

$driver

# null
protected string $root

$root

$root

# null
API documentation generated by ApiGen