Getting log entries for the server event "500 internal server error" when using GetLog(LogType.Browser)



  • After I have been doing any automated task with selenium webdriver, I check the javascript log to see if anything unexpected has happened.

    To do that, I am using

    browser.Manage().Logs.GetLog(LogType.Browser).Where(l=>l.Level != LogLevel.Warning);
    

    (This will only give me critical log entries).

    Why am I also getting log entries for 500 internal server error?

    Shouldn´t that belong to the logkind LogType.Server?



  • LogType.Browser is intended to show the javascript errors that you can observe in browser's JS-console. So if the log message appears in that console, then you'll see such the message there.

    LogType.Server does not refer to the server component of your application under test. It defines the log messages that are produced by Selenium server component.

    LogType.Client, for example, defines the messages that are produced by Selenium client-side protocol that you use in your code.

    UPD:

    • Here you can find some details on what client and what server is
    • Here you can find some details on how logging is implemented in Selenium


Suggested Topics