electron-userland / spectron

DEPRECATED: 🔎 Test Electron apps using ChromeDriver
http://electronjs.org/spectron
MIT License
1.68k stars 229 forks source link

Possible to hook into existing electron app? #193

Open dok opened 7 years ago

dok commented 7 years ago

Is it possible to connect to an existing Electron application using Spectron? I am not particularly sure on how to go about implementing this..

I'd like to be able to do something like:

import { Application } from 'spectron';
import electronPath from 'electron';
import path from 'path';

// but don't spawn new electron application
new Application({
  path: electronPath,
  args: [path.join(__dirname, '..', '..', 'app')],
});

There are some documentation out there for using debuggerAddress option in Spectron, but I'm not really sure on whether that is what I am looking for, since the arguments for debuggerAddress is url, like so: '127.0.0.1:1234'.

petrvecera commented 7 years ago

Instead of the electronPath just pass the path to your app.