If the page we are interacting with responds slowly, what is the best way to handle this situation when developing test scripts? I'm kinda confused right now:
a) Use
WebdriverWaitand specify the condition that we expect it to meet before continuing.b) Use the sleep delays provided by the language we are using to temporarily pause the execution of the test and wait for the page to finish loading.
c) Write an infinite loop that checks the status of the page and exits when the expected condition is met.
d )Do nothing and allow the test to continue running without interruption.
Which one would be the best way to go and why? Can give me an example?