add wait.byCondition method documentation (#3675)

This commit is contained in:
Icecold777 2022-06-15 14:17:27 +03:00 committed by GitHub
parent 393a63b61e
commit 841eb0cff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -1134,6 +1134,10 @@ Wait for an element found by xpath to appear before maxTime. The element needs t
#### wait.bySelector(selector, maxTime)
Wait for an element found by selector to appear before maxTime. The element needs to be visible for the user. If the element do not appear within maxTime an error will be thrown.
#### wait.byCondition(condition, maxTime)
Wait for an condition that will eventually return a truthy-value before maxTime. If the condition do not met within maxTime an error will be thrown.
condition example: document.querySelector(`a.active`).innerHTML === 'Start'
#### wait.byPageToComplete()
Wait for the page to finish loading by using the configured [page complete check](/documentation/sitespeed.io/browsers/#choose-when-to-end-your-test). This can be useful if you use Selenium to click on elements and want to wait on a new page to load.