Added functional test for adding a thread with error.
Added functional test for adding a thread with error.

Added wait to some selenium tests.