We need to instrument page.waitForTimeout with traces like we have done for some other APIs that we have (e.g. page.waitForNavigation).
Why
This is needed so that we can eventually make it clear with the page.waitForTimeout span when the test is performing some sort "sleep"/"wait" call to mimic user behaviour. e.g.:
Navigate to a website.
run page.waitForTimeout for a second to mimic the website user looking for a particular element.
At the moment it is not clear why the span for a page can be long, when it's usually due to the (current) use of sleep.
What
We need to instrument
page.waitForTimeout
with traces like we have done for some other APIs that we have (e.g. page.waitForNavigation).Why
This is needed so that we can eventually make it clear with the
page.waitForTimeout
span when the test is performing some sort "sleep"/"wait" call to mimic user behaviour. e.g.:page.waitForTimeout
for a second to mimic the website user looking for a particular element.At the moment it is not clear why the span for a page can be long, when it's usually due to the (current) use of
sleep
.This would also align better with Playwright.