.attr()
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
-
data
{String}
The attribute to get, or wait for.
-
value
{String | function()}
If provided uses this as a check before continuing to the next action
-
timeout
{Number}
Optionaloverrides FuncUnit.timeout. If provided, the wait will fail if not completed before this timeout.
-
success
{function()}
Optionala callback that will run after this action completes.
-
message
{String}
Optionalif provided, an assertion will be passed when this wait condition completes successfully
Returns
{Object}
if the attr parameter is not provided, returns the attribute.