Is it possible to disable logging the message "Using org.netbeans.jemmy.drivers.DefaultDriverInstaller driver installer" to standard output?

I am using Python 3.11 with RobotFramework 6.1.1, SwingLibrary 2.3.0 and RemoteSwingLibrary 2.3.2.

The Java application in test is used as a Google Chrome extension through NativeMessaging.

I have succesfully managed to interact with the website using BrowserLibrary keywords and with the java application using SwingLibrary and RemoteSwingLibrary keywords. I also had to copy my Chrome profile extension folder to the Chromium folder installed by rfbrowser init command and used the New Persistent Context keyword with disable-extensions-except and load-extension args as shown in the example.

The command that starts the application is like this:
javaw -javaagent:"C:\<pathToProject>\lib\remoteswinglibrary-2.2.1.jar=" -cp "swexpl.jar;swag.jar;swinglibrary-2.3.0;RemoteSwingLibrary-2.3.2" -jar "C:\<pathToProject>\MyApplication.jar" > output.log 2> errors.log

Please notice that I used standard output redirection to make the application run succesfully but this way the site cannot receive the Java application output. Without the redirection the application breaks at start because it sends the message Using org.netbeans.jemmy.drivers.DefaultDriverInstaller driver installer (Jemmy source code for reference) to standard output and consequently gets to Chrome which ends the process that started the Java application because it does not follow the expected native message protocol format.

I need to stop Jemmy from sending messages through standard output as it is essential for the Java application to communicate with Chrome. How can I achieve this?

Thanks in advance!

1 Like

Looks like it is a Jemmy feature/problem/bug after all. The JemmyProperties class has a static initialization block which gets to the previously linked code and prints the message anyway.

To get around it I decided to pipe it through some pattern searcher like findstr.

javaw -javaagent:"C:\<pathToProject>\lib\remoteswinglibrary-2.2.1.jar=" -cp "swexpl.jar;swag.jar;swinglibrary-2.3.0;RemoteSwingLibrary-2.3.2" -jar "C:\<pathToProject>\MyApplication.jar" 2> errors.log | findstr /b /v Using

I also noticed that the output was not generated when the application was tested by RobotFramework. I had to use the Set Jemmy Dispatch Model keyword with the QUEUE parameter.

So I have managed to complete the test.

1 Like