Skip to content

Commit e77a182

Browse files
committed
[py] enable selenium logging in tests if environment variable DEBUG is set
1 parent 95c75ae commit e77a182

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

py/conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
17+
import logging
1818
import os
1919
import platform
2020
import socket
@@ -140,6 +140,9 @@ def fin():
140140
driver_path = request.config.option.executable
141141
options = None
142142

143+
if os.environ.get("DEBUG"):
144+
logging.getLogger("selenium").setLevel(logging.DEBUG)
145+
143146
global driver_instance
144147
if driver_instance is None:
145148
if driver_class == "Firefox":

0 commit comments

Comments
 (0)