Selenium web driver hangs while trying to test a Flask app
I suppose, that app.run()
call is blocking and all code after that line will be executed only after flask server stops. You could start flask in a separate thread with some restrictions using app.run(debug=True, use_reloader=False)
, but more logical approach would be implementing selenium integration tests in separate classes and start them as a separate processes.