• function

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

Gets the number of elements matched by the selector or waits until the the selector is size. You can also provide a function that continues to the next action when it returns true.

F(".recipe").size()//gets the number of recipes

F(".recipe").size(2)//waits until there are 2 recipes

//waits until size is count
  return size == count;


  1. size {Number | function()}Optional

    number or a checking function.

  2. timeout {Number}Optional

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

  3. success {function()}Optional

    a callback that will run after this action completes.

  4. message {String}Optional

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



if the size parameter is not provided, size returns the number of elements matched.