The plugin provides the ability to test Electron-based desktop applications. VIVIDUS uses ChromeDriver functionality to interact with the application.
The available profile is desktop/electron
. It should be used together with web/desktop/chrome
.
configuration.profiles=desktop/electron,web/desktop/chrome
Note
|
The properties marked with bold are mandatory. |
Property Name | Acceptable values | Default | Description |
---|---|---|---|
|
An absolute file path. |
The path to the executable file of the application under test. |
|
|
The version string, e.g. |
||
|
The space-separated list of arguments e.g. |
<empty> |
The list of command line arguments for the application. |
In order to interact with the user interface one can use the steps from Web Application Plugin.
Starts the application under tests.
Given I start electron application
Given I start electron application
When I wait `PT1M` until tab with title that contains ` | Microsoft Teams` appears and switch to it
When I wait until element located by `id(searchInputField)` appears
Tip
|
Electron based applications may have one or more windows at the same time. Consider usage of the window waiting step to manipulate with the windows during testing. |
You could also find the complete example for Elector-based desktop application tests here.
When you are writing tests for the electron based application you have few options to use DevTools. The first one relies on the embedded DevTools. The second option is to use remote DevTools debugging.
The simplest way is to start your application with --remote-debugging-port=<port>
flag. Once the port is passed as an argument, DevTools will be available at http://localhost:<port>;
/Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron --remote-debugging-port=9222