Retrieve Browser Log using Selenium RC
I wasn't able to locate anything that natively allowed me to save the browser log being written to during the test.
I included the following javascript as a user extension, which hooks into Selenium's browser logging functionality:
You can then retrieve the log text as a string at the end of your test using GetEval
I go a step further and utilize TestContext.AddResultFile(String filename)
, included in Visual Studio 2010's testing suite, to neatly attach the browser log to the test result:
Labels: Browser Log, Selenium, Selenium RC
# posted by Greg @ 8/26/2011 09:25:00 PM
Post a Comment