### Assertions

Web developers can create automated tests for their Web Applications by leveraging Fake's support for Assertions. After adding a Push Assertion Failure Handler to the beginning, sprinkle your Workflow with Assert Condition Actions which assert expected aspects of the current webpage.

### Assertions in JavaScript

For more complex assertion logic, assertions can be done in JavaScript as well. In a Do JavaScript Action use the `window.fake.assert(condition, message)` function.

### Handling Assertion Failures in JavaScript

For more complex assertion failure handling logic, use a Push Assertion Failure Handler Action with the Do JavaScript option selected. In the JavaScript text field which appears, you can add complex JavaScript logic for handling the assertion failure. Run AppleScript and Run Unix Script are two similar options which also allow more complex assertion failure handling.