Dashboard > Selenium Remote Control > Home > Selenium RC Logging
Selenium Remote Control Log In View a printable version of the current page.
Selenium RC Logging
Added by Dan Fabulich, last edited by Dan Fabulich on Aug 22, 2007  (view change)
Labels: 
(None)

When you launch the Selenium Server with the -log option, it will automatically print lots of valuable debugging information out to a text file.

java -jar selenium-server.jar -log selenium.log

This log file is more verbose than the standard console logs (it includes DEBUG level logging messages). The log file also includes the logger name, and the ID number of the thread that logged the message. For example:

20:44:25 DEBUG [12] org.openqa.selenium.server.SeleniumDriverResourceHandler - Browser 465828/:top frame1 posted START NEW

The format here is:

TIMESTAMP LEVEL [THREAD] LOGGER - MESSAGE

Where TIMESTAMP is formatted as HH:mm:ss (24-hour time, no AM/PM necessary). Note that MESSAGE may be multi-line.

Browser-Side Logs

The Java implementation of the Selenium Server logs plenty of logging messages, but the JavaScript on the browser side (Selenium Core) also logs important messages; in many cases, these can be more useful to the end-user than the regular Selenium Server logs.

If you want access to browser-side logs, you'll need to pass the -browserSideLog argument to the Selenium Server, like this:

java -jar selenium-server.jar -browserSideLog

As a side effect, this will also make DEBUG level messages appear on the console.

-browserSideLog can also be combined with the -log argument, to log browserSideLogs (as well as all other DEBUG level logging messages) to a file. If you want ONLY browserSideLogs, you'll have to grep the log file for "browserSideLog".

Selenium RC Logging for Developers (Selenium Remote Control)

Site running on a free Atlassian Confluence Community License granted to OpenQA. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.6 Build:#812 Aug 06, 2007) - Bug/feature request - Contact Administrators