Starter kit for testing Electron apps using Selenium ChromeDriver with Python bindings.
Simply replace following variables in the code and restructure the testing code according to your app:
chromedriver_path = "./chromedriver"
electron_path = "/Applications/MyApp.app/Contents/MacOS/Electron"
You also need to download chromedriver binary and extract it to the repo root, and install selenium
package:
pip3 install selenium
This project utilizes page object pattern for modelling the UI components into reusable classes (page objects). These page objects encapsulate relevant UI interactions and elements in one place so when your UI changes, you'll only have to change one file. See the Selenium Docs - PageObjects wiki for detailed explanation. Wiki entry is for Java but it gives you the general idea.
If you want to bind to an existing ChromeDriver rather than starting and stopping it for every test, see issue #3.