[e2e] Implements waitFor helper
[e2e] Implements waitFor helper

Bug: 1047671
Change-Id: Ia8defd1133b1e756e5476f66eb6849b4d6a1f12b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2035945
Commit-Queue: Paul Lewis <8915f5d5c39a08c5a3e8a8d7314756e4580816f9@chromium.org>
Reviewed-by: Mathias Bynens <17a2cbc4e33156874a9862b0f530521117e66a3d@chromium.org>

ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend