.css()

  • function
FuncUnit.prototype.css  

css(prop [,val] [,timeout] [,success] [,message])

Gets a css property from an element or waits until the property is a specified value.

// gets the color
F("#foo").css("color")

// waits until the color is red
F("#foo").css("color","red")

Parameters

  1. prop {String}

    A css property to get or wait until it is a specified value.

  2. val {String | function()}Optional

    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

{String | funcUnit}

if the val parameter is provided, returns the funcUnit selector for chaining, otherwise returns the css of the selector.