[🚀 Feature]: [py] Reduce pytest output of Selenium-internals on exception #15664
Labels
C-py
Python Bindings
I-enhancement
Something could be better
J-awaiting answer
Question asked of user; a reply moves it to triage again
Uh oh!
There was an error while loading. Please reload this page.
Description
I would like pytest to show less Selenium internal code and variables in it's output when there is an exception. For example, let's say one has a test like this:
Then the output from
pytest -slvv
has something like these stack frames:Of these, the first and last are shown in verbose form including (IIUC) all the source code of the function, the variables and their values and so on. (The middle ones are shown in a compact form, with only one line of source code). The net result is that there are about 140 lines of output for check_response(), including a stack trace.
I propose to make
check_response()
into a minimal wrapper around a_check_response_real()
and so remove most of this. The core of a possible patch looks something like this:The 140 lines of Selenium internal is reduced to about 40 lines if there a stack trace, or just 20 lines if not. IMHO, this makes reading the output and thence debugging much nicer. I will propose a patch in due course.
Have you considered any alternatives or workarounds?
No response
The text was updated successfully, but these errors were encountered: