I\'ve already written few lines of code in C# using Selenium webdriver. As my application was transferred to the Electron framework everything has changed and honestly, I do
Spectron with mocha is supposed to be faster.
But still here is what you need.This is Java & Selenium.
System.setProperty("webdriver.chrome.driver","C:\\electron-chromedriver\\bin\\chromedriver.exe");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.setBinary("C:\\Users\\app.exe");
chromeOptions.addArguments("start-maximized");
DesiredCapabilities capability = new DesiredCapabilities();
capability.setCapability(CapabilityType.BROWSER_NAME, "Chrome");
capability.setCapability("chromeOptions", chromeOptions);
driver = new ChromeDriver(chromeOptions);
I have used the packaged electron app for binary (i.e) app.exe .
I think this is what you need.