Custom Timeout
By default, Playwright waits up to 30 seconds. You can override this per action using the timeout option.
On Appearing Elements, #appearing5sec appears after 5 seconds and #appearing10sec after 10 seconds.
Task:
- Navigate to
https://testkru.com/Interactions/AppearingElements - Wait for
#appearing5secwith a timeout of 8 seconds - Print its text
- Check if
#appearing10secis visible (it should still be hidden at this point)
Expected output:
First element: Message appeared after 5 seconds Second still hidden: true
TestKru