Wait for a condition and execute rest of the code.
A function that returns conditions to be waited for.
Max duration (in ms) to wait before promise resolves to avoid indefinite wait.
A promise that resolves after given condition in conditionFunction is satisfied or after the max wait time.
Wait for a condition and execute rest of the code.