.exists()

  • function
FuncUnit.prototype.exists  

exists([timeout] [,success] [,message])

Waits until an element exists before running the next action.

//waits until #foo exists before clicking it.
F("#foo").exists().click()

Parameters

  1. timeout {Number}Optional

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

  2. success {function()}Optional

    a success that is run after the selector exists, but before the next action.

  3. message {String}Optional

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

Returns

{FuncUnit}

returns the funcUnit for chaining.