My test scenarios currently cover over 300 test cases. Everything is written in Python (3.8) and Selenium and all test cases are covered by exceptions.

At the moment there is only one possibility missing which can be used after X minutes when the current test aborts due to unavailability of the server / site and the next test is executed.

If this one should not work either, then it should best abort the complete test with a corresponding message.

Can I implement this with Selenium?

  • Are using any frame work to run the tests ?
    – PDHide
    Apr 1, 2020 at 20:31
  • i use unittest with selenium in python
    – Mornon
    Apr 1, 2020 at 21:02

1 Answer 1


There is a StackOverflow answer to it: https://stackoverflow.com/a/14920854/2252076

In summary:

# You start a function foo
p = multiprocessing.Process(target=foo, name="Foo", args=(10,))

# Wait until the function ends or it takes 10 seconds

# If thread is active
if p.is_alive():
    # Terminate foo
    p.join() #Clean-up

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.