.attr()

  • function
FuncUnit.prototype.attr  

attr(data, value [,timeout] [,success] [,message])

Gets the value of an attribute from an element or waits until the attribute equals the attr param.

//waits until the abc attribute == some
F("#something").attr("abc","some")

Parameters

  1. data {String}

    The attribute to get, or wait for.

  2. value {String | function()}

    If provided uses this as a check before continuing to the next action

  3. timeout {Number}Optional

    overrides FuncUnit.timeout. If provided, the wait will fail if not completed before this timeout.

  4. success {function()}Optional

    a callback that will run after this action completes.

  5. message {String}Optional

    if provided, an assertion will be passed when this wait condition completes successfully

Returns

{Object}

if the attr parameter is not provided, returns the attribute.