• function

wait FuncUnit.wait


wait(time, success)

Waits a timeout before running the next command. Wait is an action and gets added to the queue.

S.wait(100, function(){
  equals( S('#foo').innerWidth(), 100, "innerWidth is 100");


  1. time {Number}Optional

    The timeout in milliseconds. Defaults to 5000.

  2. success {function()}Optional

    A callback that will run after the wait has completed, but before any more queued actions.