I have electron based application need to automate, but start exe need to pass parameter, how to pass parameters when use spectron or selenium to do the automation?
Here is the cmd to start Electron:
Electron.exe --manifest https://hostname/quantum/configs/openfin/manfest-uat.json
My code
System.setProperty("webdriver.chrome.driver", "drivers/chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.setBinary("C:\\xxx\\xx\\lf2v0\\UAT1\\e2o\\Electron.exe");
options.addArguments("--app=" + "C:\\xx\\xx\\lf2v0\\UAT1\\e2o");
options.addArguments("--manifest=" + "https://xxx/quantum/configs/openfin/manifest-uat.json");
options.setCapability("chromeOptions", options);
ChromeDriver driver = new ChromeDriver(options);
Thread.sleep(5000);
Set<String> windowHandles = driver.getWindowHandles();
here is the error org.openqa.selenium.WebDriverException: unknown error: DevToolsActivePort file doesn't exist