selenium-standalone icon indicating copy to clipboard operation
selenium-standalone copied to clipboard

ChromeDriver verbose logging

Open sutris opened this issue 9 years ago • 4 comments

Hi, may I know how to start a selenium-standalone server with ChromeDriver verbose logging (reference)? Thank you 🙏

sutris avatar May 19 '17 03:05 sutris

Does something like the following work for what you are trying to do?

selenium-standalone start --javaArgs="-Dwebdriver.chrome.logfile=chrome.log"

stephenash avatar May 19 '17 16:05 stephenash

Thank you @stephenash; unfortunate using that --javaArgs arg produce the same log as without the arg.

Maybe this docs could help: https://sites.google.com/a/chromium.org/chromedriver/logging

sutris avatar May 22 '17 02:05 sutris

When I tested --javaArgs="-Dwebdriver.chrome.logfile=chrome.log", it produced a different log file than running without it (located at ./chrome.log in that example, and not logging to stdout). That was based on the Java example that was listed in the ChromeDriver logging link that you provided.

The other examples that are listed on that page (e.g. chromedriver.exe --verbose) don't work for selenium-standalone. It is only starting the selenium.jar process to setup the Selenium hub/server. The selenium.jar process in turn starts Chrome based on how the driver was configured.

I also tried changing how selenium-standalone passes in arguments to where the driver is defined like

-Dwebdriver.chrome.driver="/tmp/selenium-standalone/.selenium/chromedriver/2.29-x64-chromedriver --verbose"

but that didn't allow Chrome to start at all. If you have other examples of how this is configured through Selenium server, we can explore it more. Without that, I'm not sure exactly what selenium-standalone could do to support this case.

stephenash avatar May 22 '17 17:05 stephenash

Oh yes, sorry @stephenash, I misidentified the log file. --javaArgs="-Dwebdriver.chrome.logfile=chrome.log" do works like what you explained. Thank you very much! I will close this issue :)

sutris avatar May 23 '17 01:05 sutris