I use -D java parameters to specify the path to executable driver when register a new node in selenium grid:
java -Dwebdriver.chrome.driver="../driver/chromedriver.exe" -jar selenium-server-standalone-3.3.1.jar -role node -hub http://localhost:4445/grid/register -nodeConfig config/defaultNodeConfig.json
I'd like to use webdrivermanager-java library (https://github.com/bonigarcia/webdrivermanager) to manage driver executable files. But it registers drivers using System.setProperty(), so it available only in JVM where the library is running (am I mistaken?).
My question is:
What is the proper way to call webdrivermanager-java from command line before starting he node and how to export path of downloaded drivers to selenium node's -D java parameter?
I have an idea to create tiny "node-runner" java application and call webdrivermanager and selenium-server-standalone.jar in it, so they use the same JVM environment.
Is there a better solution to set nodes' drivers paths using webdrivermanager?