var driver = new webdriver.Builder()
// The "9515" is the port opened by chrome driver.
.usingServer('http://localhost:9515')
- .withCapabilities({chromeOptions: {
- // Here is the path to your Electron binary.
- binary: '/Path-to-Your-App.app/Contents/MacOS/Atom'}})
+ .withCapabilities({
+ chromeOptions: {
+ // Here is the path to your Electron binary.
+ binary: '/Path-to-Your-App.app/Contents/MacOS/Atom',
+ }
+ })
.forBrowser('electron')
.build();
port: 9515, // "9515" is the port opened by chrome driver.
desiredCapabilities: {
browserName: 'chrome',
- chromeOptions: {binary: '/Path-to-Your-App.app/Electron'} // Path to your Electron binary.
+ chromeOptions: {
+ binary: '/Path-to-Your-App/electron', // Path to your Electron binary.
+ args: [/* cli arguments */] // Optional, perhaps 'app=' + /path/to/your/app/
+ }
}
};
[place](https://github.com/atom/electron/blob/master/docs/tutorial/application-distribution.md)
your app source into Electron's resource directory.
+Alternatively, pass an argument to run with your electron binary that points to
+your app's folder. This eliminates the need to copy-paste your app into
+Electron's resource directory.
+
[chrome-driver]: https://sites.google.com/a/chromium.org/chromedriver/