This commit replaces all `waitForTimeout` occurrences with the appropriate `waitForFunction` calls. Note that in some places they were already present, so in those cases we could simply remove the `waitForTimeout` call altogether.
This commit replaces all `waitForTimeout` occurrences with the appropriate `waitForFunction` calls. Note that in some places they were already present, so in those cases we could simply remove the `waitForTimeout` call altogether.