New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way to set Firefox log options #1148
Comments
The WebDriver standard does make it possible for Selenium Grid to define an extension capability that could be used for passing on variables to the environment that runs geckodriver. Like you suggested, that might be a more generic solution than building it into each driver (and would also let you set things like Strawman proposal:
|
Wouldn't this only solve the problem for Selenium Grid? What about other users that want to control the log levels of Firefox on a per session basis? |
They can presumably set it in their own environment. No special provisions need to be made if the Firefox instance runs on the local system. |
There are more options than local and grid. What about a remote server instance, or Docker? |
I think in both those cases you have direct control over the environment? My concern is that gluing propagation of environment variables on to capabilities specifically for one driver implementation will not solve all use cases and will cause ample confusion. Environment variables are not well understood by users and abstracting them on top of capabilities to communicate configuration for a narrow subset of processes (specifically, Firefox and its subprocesses) on a foreign machine does not make the distinction clearer. My feeling is that environment propagation is beyond the scope of what a driver should offer, primarily because you can imagine wanting to also have variables that affect the driver itself and because the problem only exists for remote systems. I don’t think adding more entry-points for driver-specific configuration is a good idea because there are already a plethora of them that take various presedences (defaults, flags, capabilities negotiation of |
No, not necessarily. I have the same concerns and opinions regarding environment variables, but I feel solving it just for Selenium Grid would more than likely cause more confusion and frustration, not less. |
Propagating environment variables is a task that only makes sense in the sort of distributed environment that Grid provides. With Docker you use Let me illustrate what I fear will happen. We often tell users to put geckodriver on their |
Feel free to close this if you two both agree that it's something that should be done in Selenium. I've opened an issue there as well (see above). |
Rather than allowing arbitrary environment variables, could we support additional capabilities, which are translated into the necessary environment variables? If there's only a handful, and they related specifically to Firefox, I think this could be maintainable. I'm thinking, for example: {"moz:firefoxOptions": {
"R_LOG_LEVEL": 3,
"R_LOG_VERBOSE": 1,
"NSPR_LOG_MODULES": "DataChannel:5,SCTP:3"}
} |
It's possible to set log levels for the geckodriver itself via
{"moz:firefoxOptions": {"log": {"level": "..."}}}
but there's no way to set specific log options for Firefox in a convenient manner.I'd like to be able to set things such as the following logging options:
I could set those before running
geckodriver
but take the following scenario: I have a Selenium Grid and I want to run a test that requires Firefox logging output for analysis from specific modules, such asDataChannel
orSCTP
. I could apply those environment variables to the running environment but with Selenium Grid I don't control environment variables on the executing node.I guess it would be sufficient to provide a way to set those environment variables by additional arguments (granted, Selenium Grid could also provide a way to just set environment variables remotely).
The text was updated successfully, but these errors were encountered: