The Selenium Files: Missing Log Message in Selenium IDE

Every now and then I noticed that the first log message did not show up in the log pane of the Selenium IDE. Thanks to my File Logging plugin for Selenium IDE, it was never a problem. The File Logging plugin would capture the log message to a file even if it was not shown in the log pane. I never bothered to investigate missing log message bug further or try to identify steps to reproduce it. This weekend while I was working on the next version of the File Logging plugin, I came across the following piece of code in editor.js in Selenium IDE code.

Hmmm. That explains the problem and the circumstances under which the missing log message bug occurs. Basically, if the log pane is hidden, i.e. another pane like the reference pane is visible, the log pane is shown, but the log message is not shown. Hence, if the log pane is not visible, the log message goes missing.

The Fix

Now that I have found the cause of the problem, the fix is trivial. If the log pane is hidden, show it first and then show the log message.