You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### 🚨 On February 1, 2022, Spectron will be officially deprecated by the Electron team. Please read about more about [our planned deprecation here](https://github.com/electron-userland/spectron/issues/1045).
7
+
6
8
Easily test your [Electron](http://electron.atom.io) apps using
7
-
[ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver) and
9
+
[ChromeDriver](https://sites.google.com/chromium.org/driver) and
8
10
[WebdriverIO](http://webdriver.io).
9
11
10
12
## Version Map
@@ -34,6 +36,8 @@ For given versions of Electron you must depend on a very specific version range
34
36
|`^11.0.0`|`^13.0.0`|
35
37
|`^12.0.0`|`^14.0.0`|
36
38
|`^13.0.0`|`^15.0.0`|
39
+
|`^14.0.0`|`^16.0.0`|
40
+
|`^15.0.0`|`^17.0.0`|
37
41
38
42
Learn more from [this presentation](https://speakerdeck.com/kevinsawicki/testing-your-electron-apps-with-chromedriver).
39
43
@@ -133,6 +137,13 @@ For more information on how to configure mocha, please visit [mocha](https://moc
133
137
134
138
As stated in [issue #19](https://github.com/electron/spectron/issues/19), Spectron will not be able to start if your Electron app is launched using the `remote-debugging-port` command-line switch (i.e. `app.commandLine.appendSwitch('remote-debugging-port', <debugging-port-number>);`). Please make sure to include the necessary logic in your app's code to disable the switch during tests.
135
139
140
+
As mentioned in [issue #202](https://github.com/electron-userland/spectron/issues/202#issuecomment-632223955),
141
+
`app.start()` promise won't resolve if the electron application calls
142
+
`setPath('userData', path)`. Webdriver places a port file into the `userData`
143
+
directory and needs to know where to look for it. The workaround is to pass
144
+
`chromeDriverArgs: ['user-data-dir=/custom/userData/path']` to the `Application`
145
+
constructor.
146
+
136
147
## Application API
137
148
138
149
Spectron exports an `Application` class that when configured, can start and
@@ -150,7 +161,7 @@ Create a new application with the following options:
150
161
array.
151
162
*`args` - Array of arguments to pass to the Electron application.
152
163
*`chromeDriverArgs` - Array of arguments to pass to ChromeDriver.
153
-
See [here](https://sites.google.com/a/chromium.org/chromedriver/capabilities) for details on the Chrome arguments.
164
+
See [here](https://sites.google.com/chromium.org/driver/capabilities) for details on the Chrome arguments.
154
165
*`cwd`- String path to the working directory to use for the launched
155
166
application. Defaults to `process.cwd()`.
156
167
*`env` - Object of additional environment variables to set in the launched
@@ -208,7 +219,7 @@ property which do not require Node integration.
208
219
209
220
#### client
210
221
211
-
Spectron uses [WebdriverIO](http://webdriver.io) and exposes the managed
222
+
Spectron uses [WebdriverIO](https://webdriver.io) and exposes the managed
212
223
`client` property on the created `Application` instances.
213
224
214
225
The `client` API is WebdriverIO's `browser` object. Documentation can be found
@@ -221,8 +232,10 @@ All the commands return a `Promise`.
221
232
So if you wanted to get the text of an element you would do:
0 commit comments