New steps for browser wait

New step: exists

Analog to the visible/not visible step, there is a new step added for exists/does not exist.
Where the visible step also perform a css check (except for visibility hidden and display none), the new step only checks if the elements are available in the DOM structure.

New step: wait until X

In some cases a test must wait on a AJAX or Javascript action. Often, the common i wait for X ms step is used.  

The disavantage of this step is that it will always wait for as long as declared in the X and so the total test time will be longer then maybe necessary.

If we wait for an element to appear/disappear we can now use this new step:

  • Wait until a certain element is visible/not visible
  • Wait until a certain element exists in the DOM structure
  • Give the maximum wait time (if not specified, it's 10 seconds.)

When the maximum wait time is achieved the test sill fail.

Examples:

  • i wait until div "X" is visible
  • wait for 500 ms until link "A" in div 2 exists

Example code: http://stash.foreach.be/projects/FE/repos/cucumber-test-framework/browse/ctf-lib-sahi/features/01%20-%20Basic%20actions.feature

The Language Reference is updated.