API Docs for: 0.0.6
Show:

Dalek.DriverNative.Commands.Element Class

Module: Driver

Element related methods

Methods

_attributeCb

(
  • selector
  • hash
  • attribute
  • expected
  • result
)
Object private

Sends out an event with the results of the attribute call

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

  • attribute String

    The attribute that should be checked

  • expected String

    The expected attribute content

  • result String

    Serialized JSON with the results of the attribute call

Returns:

Object:

promise Attribute promise

_clickCb

(
  • selector
  • hash
  • uuid
)
Object private

Sends out an event with the results of the click call

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

  • uuid String

    Unique hash of that fn call

Returns:

Object:

promise Click promise

_cssCb

(
  • selector
  • property
  • expected
  • hash
  • result
)
Object private

Sends out an event with the results of the css call

Parameters:

  • selector String

    Selector expression to find the element

  • property String

    The css property to check

  • expected String

    The expected css value

  • hash String

    Unique hash of that fn call

  • result String

    Serialized JSON with the reuslts of the text call

Returns:

Object:

Promise

_enabledCb

(
  • selector
  • hash
  • expected
  • result
)
Object private

Sends out an event with the results of the enabled call

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

  • expected String

    The expected content

  • result String

    Serialized JSON with the results of the selected call

Returns:

Object:

Promise

_existsCb

(
  • selector
  • hash
  • result
)
Object private

Sends out an event with the results of the exists call

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

  • result String

    Serialized JSON with the reuslts of the exists call

Returns:

Object:

promise Exists promise

_getNumberOfElementsCb

(
  • selector
  • hash
  • expected
  • res
)
Object private

Sends out an event with the results of the getNumberOfVisibleElements call

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

  • expected Integer

    Expected number of matched elements

  • res String

    Serialized JSON with the results of the getNumberOfVisibleElements call

Returns:

Object:

promise GetNumberOfElements promise

_getNumberOfElementsCb

(
  • selector
  • hash
  • expected
  • res
)
Object private

Sends out an event with the results of the getNumberOfElements call

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

  • expected Integer

    Expected number of matched elements

  • res String

    Serialized JSON with the results of the getNumberOfElements call

Returns:

Object:

promise GetNumberOfElements promise

_heightCb

(
  • selector
  • expected
  • hash
  • result
)
Object private

Sends out an event with the results of the height call

Parameters:

  • selector String

    Selector expression to find the element

  • expected String

    The expected height value

  • hash String

    Unique hash of that fn call

  • result String

    Serialized JSON with the reuslts of the text call

Returns:

Object:

Promise

_scrollCb

(
  • selector
  • options
  • hash
  • uuid
)
Object private

Sends out an event with the results of the scroll call

Parameters:

  • selector String

    Selector expression to find the element

  • options Object

    X offset, Y offset, Speed

  • hash String

    Unique hash of that fn call

  • uuid String

    Unique hash of that fn call

Returns:

Object:

promise Scroll promise

_selectedCb

(
  • selector
  • hash
  • expected
  • result
)
Object private

Sends out an event with the results of the selected call

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

  • expected String

    The expected content

  • result String

    Serialized JSON with the results of the selected call

Returns:

Object:

Promise

_sendKeysCb

(
  • selector
  • hash
)
Object private

Sends out an event with the results of the sendKeys call

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

Returns:

Object:

promise Type promise

_setValueCb

(
  • selector
  • keystrokes
  • hash
)
Object private

Sends out an event with the results of the setvalue call

Parameters:

  • selector String

    Selector expression to find the element

  • keystrokes String

    Value to set

  • hash String

    Unique hash of that fn call

Returns:

Object:

promise Type promise

_submitCb

(
  • selector
  • hash
  • uuid
)
Object private

Sends out an event with the results of the submit call

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

  • uuid String

    Unique hash of that fn call

Returns:

Object:

promise Click promise

_textCb

(
  • selector
  • hash
  • expected
  • result
)
Object private

Sends out an event with the results of the text call

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

  • expected String

    The expected text content

  • result String

    Serialized JSON with the reuslts of the text call

Returns:

Object:

Promise

_typeCb

(
  • selector
  • hash
)
Object private

Sends out an event with the results of the type call

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

Returns:

Object:

promise Type promise

_valCb

(
  • selector
  • hash
  • expected
  • result
)
Object private

Sends out an event with the results of the val call

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

  • expected String

    The expected content

  • result String

    Serialized JSON with the results of the val call

Returns:

Object:

Promise

_visibleCb

(
  • selector
  • hash
  • result
)
Object private

Sends out an event with the results of the visible call

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

  • result String

    Serialized JSON with the reuslts of the visible call

Returns:

Object:

promise Visible promise

_waitForElementCb

(
  • selector
  • hash
  • uuid
)
Object private

Sends out an event with the results of the waitForElement call

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

  • uuid String

    Unique hash of that fn call

Returns:

Object:

promise WaitForElement promise

_widthCb

(
  • selector
  • expected
  • hash
  • result
)
Object private

Sends out an event with the results of the width call

Parameters:

  • selector String

    Selector expression to find the element

  • expected String

    The expected width value

  • hash String

    Unique hash of that fn call

  • result String

    Serialized JSON with the reuslts of the text call

Returns:

Object:

Promise

attribute

(
  • selector
  • attribute
  • expected
  • hash
)
chainable

Checks if an element has an attribute with the expected value

Parameters:

  • selector String

    Selector expression to find the element

  • attribute String

    The attribute that should be checked

  • expected String

    The expected text content

  • hash String

    Unique hash of that fn call

click

(
  • selector
  • hash
)
chainable

Clicks an element

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

click

(
  • selector
  • hash
  • uuid
)
chainable

Clicks an element

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

  • uuid String

    Unique hash of that fn call

css

(
  • selector
  • property
  • expected
  • hash
)
chainable

Checks if an element has the expected css property/value pairs

Parameters:

  • selector String

    Selector expression to find the element

  • property String

    The css property to check

  • expected String

    The expected css value

  • hash String

    Unique hash of that fn call

enabled

(
  • selector
  • expected
  • hash
)
chainable

Checks if an element is enabled

Parameters:

  • selector String

    Selector expression to find the element

  • expected String

    The expected content

  • hash String

    Unique hash of that fn call

exists

(
  • selector
  • hash
)
chainable

Checks if an element exists

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

getNumberOfElements

(
  • selector
  • expected
  • uuid
)
chainable

Returns the number of elements matched by the selector

Parameters:

  • selector String

    Selector expression to find the elements

  • expected Integer

    Expected number of matched elements

  • uuid String

    Unique hash of that fn call

getNumberOfVisibleElements

(
  • selector
  • expected
  • uuid
)
chainable

Returns the number of visible elements matched by the selector

Parameters:

  • selector String

    Selector expression to find the elements

  • expected Integer

    Expected number of matched elements

  • uuid String

    Unique hash of that fn call

height

(
  • selector
  • expected
  • hash
)
chainable

Checks th height of an element

Parameters:

  • selector String

    Selector expression to find the element

  • expected String

    The expected height value

  • hash String

    Unique hash of that fn call

scroll

(
  • selector
  • options
  • hash
  • uuid
)
chainable

Scrolls from an element to a location defined in pixels

Parameters:

  • selector String

    Selector expression to find the element

  • options Object

    X offset, Y offset, Speed

  • hash String

    Unique hash of that fn call

  • uuid String

    Unique hash of that fn call

selected

(
  • selector
  • expected
  • hash
)
chainable

Checks if an element is selected

Parameters:

  • selector String

    Selector expression to find the element

  • expected String

    The expected content

  • hash String

    Unique hash of that fn call

sendKeys

(
  • selector
  • hash
)
chainable

Sends keys to an element (whether or not it is an input)

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

setValue

(
  • selector
  • hash
)
chainable

Set a value to an Element

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

submit

(
  • selector
  • hash
  • uuid
)
chainable

Submits a form

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

  • uuid String

    Unique hash of that fn call

text

(
  • selector
  • expected
  • hash
)
chainable

Checks if an element has the expected text

Parameters:

  • selector String

    Selector expression to find the element

  • expected String

    The expected text content

  • hash String

    Unique hash of that fn call

val

(
  • selector
  • expected
  • hash
)
chainable

Checks if an element has the expected value

Parameters:

  • selector String

    Selector expression to find the element

  • expected String

    The expected content

  • hash String

    Unique hash of that fn call

visible

(
  • selector
  • hash
)
chainable

Checks if an element is visible

Parameters:

  • selector String

    Selector expression to find the element

  • hash String

    Unique hash of that fn call

waitForElement

(
  • selector
  • timeout
  • hash
  • uuid
)
chainable

Wait for an element for a specific amount of time

Parameters:

  • selector String

    Selector expression to find the element

  • timeout Integer

    Time to wait in ms

  • hash String

    Unique hash of that fn call

  • uuid String

    Unique hash of that fn call

width

(
  • selector
  • expected
  • hash
)
chainable

Checks th width of an element

Parameters:

  • selector String

    Selector expression to find the element

  • expected String

    The expected width value

  • hash String

    Unique hash of that fn call