In this article, we are going
to discuss one of the interesting topics on Selenium test automation on how to
suppress selenium logs while executing our automation scripts on the chrome and
firefox browser.
As we
all know whenever we execute our automation scripts either on chrome or
firefox browser along with application logs we usually get selenium execution
logs as well sometimes which is very irritating for the end-user as it also
results in loss of actual application logs.
FireFox Browser Logs |
Chrome Browser Logs |
To
solve this problem in the chrome browser we can make use of silent mode.
To
implement silent mode in chrome browser we need to make it true in the
system.SetProperty.
Final
code implementation in the case of chrome browser will look like this.
Similarly,
for Firefox Browser we can make use of BROWSER_LOGFILE and pass its value as
null.
Final
code implementation in the case of the Firefox browser will look like this.