selenium icon indicating copy to clipboard operation
selenium copied to clipboard

Logging in 3.0.1 - Browser Initialization - ProtocolHandshake

Open TWood-IRL opened this issue 10 years ago • 13 comments

Meta -

OS: Windows 7

Selenium Version: 3.0.1 Browser: Seems to effect any browsers started on a remoteWebDriver

Browser Version:
ANY

Expected Behavior -

Not a huge issue but just something I've noticed with our automated suite As it adds a good bit to build log On anything before 3.0.0 Starting up a selenium browser instance on a remoteWebDriver wouldn't output any logging information

Actual Behavior -

Could be something I'm missing but just not sure
Now when a browser is started up it seems to output this to the command line for each browser that is started up

Nov 10, 2016 11:58:24 AM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end Nov 10, 2016 11:58:27 AM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: OSS

Steps to reproduce -

Initialize browser driver = new RemoteWebDriver(new URL(hub), capability);

TWood-IRL avatar Nov 10 '16 12:11 TWood-IRL

@shs96c Not sure If you know what I'm doing wrong

TWood-IRL avatar Nov 11 '16 11:11 TWood-IRL

I have this 'issue' as well, when I investigated as far as I can tell it should be printing it out, although our jobs in jenkins occasionally interpret it as an error which is interesting.

matthew-williamson-hpe avatar Nov 11 '16 15:11 matthew-williamson-hpe

Yeah, it's nothing major but it would be nice not to see it.

conleth avatar Nov 11 '16 16:11 conleth

I can confirm that only changing the Selenium API from 2.53.1 to 3.0.0 (with no other changes) will introduce this error message.

But it seems that this is only a "warning" because it has no impact to the tests executed.

drieks avatar Nov 11 '16 17:11 drieks

see also mozilla/geckodriver#229

drieks avatar Nov 11 '16 17:11 drieks

Also happens on Linux, I think:

OS: Any Browser: Any Selenium: 3.0.0 and 3.0.1

drieks avatar Nov 11 '16 17:11 drieks

@andreastt can you add a link to this issue in mozilla/geckodriver#229 ?

drieks avatar Nov 11 '16 17:11 drieks

The INFO message was added in Se3. It is not an error or warning.
The only way to disable it is to disable or reconfigure the java logger.

mach6 avatar Nov 12 '16 01:11 mach6

I'm still having trouble with this trying to explicitly remove the logging from this class Would you know what I'm missing

TWood-IRL avatar Nov 18 '16 14:11 TWood-IRL

This is an INFO message and just so people can see what is going on. If it were ERROR then it would be something to worry about

AutomatedTester avatar Nov 18 '16 15:11 AutomatedTester

I am getting this issue with following configuration

Standalone 2.53.1 Chromedriver 2.9 JDK 1.8.0_66

I even tried Standalone 3.0

krpradeep9 avatar Nov 25 '16 13:11 krpradeep9

Hey guys,

I know this is not an error or a problem, but this was showing up in our JUnit results and I did not want to see it. I just wanted to mention what I did to remove this "ERROR" for future people who come to this page.

import java.util.logging.Level; import java.util.logging.Logger; Logger.getLogger("org.openqa.selenium.remote").setLevel(Level.OFF);

I was trying everything I could to turn this logging off with log4j, and it was not until I read the java source code. Once I realized they used java.util.logging, it was relatively simple to turn it off.

Enjoy

chandlerlucius avatar May 11 '17 16:05 chandlerlucius

I had to do the following to get the ChromeDriver to be completely quiet:

Logger.getLogger("org.openqa.selenium.remote").setLevel(Level.OFF);
System.setProperty("webdriver.chrome.silentOutput", "true");
ChromeOptions options = new ChromeOptions();
options.addArguments("--headless");
ChromeDriver chrome = new ChromeDriver(options);

nkavian avatar Jun 03 '19 04:06 nkavian