title: Start Electron application with Selenium WebDriver using command line arguments
body: <p>I have an Electron application (<code>chat.exe</code>) and using the following code snippet I can start it with <em>Chromedriver</em>:</p>
  
  <pre class="lang-java prettyprint-override"><code>ChromeOptions options = new ChromeOptions();
  options.setBinary(System.getenv("CHAT")); // CHAT = path to Chat.exe
  driver = new ChromeDriver(options);
  </code></pre>
  
  <p>My question is: how can I start it with command line arguments?</p>
  
  <p>e.g. <code>chat.exe -- --electronPort 5000 --webpackPort 3000 --accessToken 123456789</code></p>
  
  <p>I tried the following way but didn't worked:</p>
  
  <pre class="lang-java prettyprint-override"><code>ChromeOptions options = new ChromeOptions();
  options.setBinary(System.getenv("CHAT")); // CHAT = path to Chat.exe
  options.addArguments("-- --electronPort 5000 --webpackPort 3000 --accessToken 123456789");
  driver = new ChromeDriver(options);
  </code></pre>
  
  <p>The following error is displayed:</p>
  
  <p><code>org.openqa.selenium.WebDriverException: chrome not reachable</code></p>