1

I need to test time tracking on a page. I need to be able to pause and do nothing but run the clock and log time. Most of what I've seen from Googling is just Thread.sleep(300) but there are times that I actually need a test to wait five minutes or more. I don't want to exceed 5 minutes of timeout when I start the node simply because, if there's a client failure, I want the node to release the browser so another test can start. One thing I have tried is waiting a specific amount of time for an element that I know isn't there so that it periodically sends instructions to the node so it doesn't release the browser, but for some reason, it only works when I'm debugging. Otherwise it waits forever. I could make a method that uses .sleep() and periodically sends some trivial instruction to the node like getting the current URL to keep it from dropping the browser. What is the best way to pause for 5+ minutes without increasing the timeout parameter for the node?

item5
  • 195
  • 3
  • 17

0 Answers0