Could you make sure that the log is actually displayed before clearing it? It may be empty right away and then test will not catch regressions.