Automating any CEF based application using WebDriver in java, We can achieve this in 4 steps.
We need chromeDriver, Download from ChromeDriver
ChromeDriverService service = new ChromeDriverService.Builder()
.usingDriverExecutable(new File("chromedriver/chromedriver"))
.usingAnyFreePort()
.build();
service.start();
DesiredCapabilities capabilities = new DesiredCapabilities();
ChromeOptions options = new ChromeOptions();
// The address string should be in the form of "hostname/ip:port". 9222 is the port that you specified // in the--remote-debugging-port Chromium
String remoteDebuggingAddress = "localhost:9222";
options.setExperimentalOption("debuggerAddress", remoteDebuggingAddress);
capabilities.setCapability(ChromeOptions.CAPABILITY, options)
// Create a WebDriver instance using URL provided by the ChromeDriverService and capabilities
WebDriver driver = new RemoteWebDriver(service.getUrl(), capabilities);
If your application have Multiple pages or windows, You can discover available pages by requesting: http://localhost:9222/json and getting a JSON object with information about inspectable pages.