Explore Courses Blog Tutorials Interview Questions
0 votes
in DevOps and Agile by (19.7k points)

I've recently inherited some Selenium Webdriver code, written in Python 2.7. It is logging copious amounts of data to /tmp on Ubuntu - so much that it is becoming a problem. I am trying to turn it off (or at least down).

I have been running around trying to RTFM, but this is a new version of Selenium (2.19.0) and the manuals aren't written yet!

I can see there is a method called set_browser_log_level(logLevel) which sounds promising, but to get to it, I need to instantiate a selenium.selenium.selenium object. I don't otherwise have to instantiate one of these, and it takes a lot of parameters (which host? what port?) that I am not expecting to have to provide.

Clearly, I am misunderstanding something.

Can someone please explain either (a) how to turn off logging, or (b) what service is it that selenium.selenium.selenium.selenium.selenium (I may have got carried away there, sorry!) wants to talk to?

1 Answer

0 votes
by (62.9k points)

Here's what helped me to overcome the problem:

import logging

from selenium.webdriver.remote.remote_connection import LOGGER


Please note that before the web driver initialization, this code should be put.

I hope that helps!

If you are interested to learn Selenium on a much deeper level and want to become a professional in the testing domain, check out Intellipaat’s advanced Selenium training!

Browse Categories