Fix bug where waitsFor has an optional failureMessage

It should be defined as optional for failureMessage according to the specifications.
Merge pull request #1404 from mohamedmansour/patch-1

Fix bug where waitsFor has an optional failureMessage