iOS 11 / Xcode 9
<#yourElement#>.waitForExistence(timeout: 5)
This is a great replacement for all the custom implementations on this site!
Be sure to have a look at my answer here: https://stackoverflow.com/a/48937714/971329. There I describe an alternative to waiting for requests which will greatly reduce the time your tests are running!