Ending a Do While loop if condition doesn't meet

I’m trying a Do While loop that’s Data scraping until the table has a certain row. How do I end the loop if it never reaches the condition? I just want the process to end once the table is unable to get 30 rows. The shortest I want the Scraping loop is for about 5 minutes, so is it possible to just end the process after 5 minutes of looping?


Can you try to use Stopwatch class as the following?



Yes it works, exactly what I was looking for, thanks!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.