Skip to content

Instantly share code, notes, and snippets.

@muryoimpl
Last active August 5, 2020 04:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muryoimpl/a58824ebbfadee1c788b to your computer and use it in GitHub Desktop.
Save muryoimpl/a58824ebbfadee1c788b to your computer and use it in GitHub Desktop.
A configuration file of protractor for my Electron App
/*global browser*/
require('babel-register')({
presets: ['es2015', 'stage-0', 'stage-1', 'react'],
plugins: ['babel-plugin-espower'],
only: /e2e/,
extensions: ['.js']
});
exports.config = {
chromeDriver: './node_modules/protractor/selenium/chromedriver',
seleniumAddress: 'http://localhost:4444/wd/hub',
framework: 'mocha',
directConnect: true,
specs: [
'test/e2e/*.e2e.js'
],
capabilities: {
browserName: 'chrome',
platform: 'LINUX',
chromeOptions: {
binary: './node_modules/electron-prebuilt/dist/electron',
args: ['--test-type=webdriver', 'app=main.js']
}
},
onPrepare: function() {
browser.ignoreSynchronization = true; //not Angular な環境で protractor が使える
browser.resetUrl = 'file://';
},
mochaOpts: {
ui: '',
reporter: 'list',
slow: 3000,
enableTimeouts: false
}
};
@elenatosheva
Copy link

Hi

Did you succeeded in writing protractor tests for electron application?
I'm currently trying to set up existing protractor tests to run over an electron application, but face a lot of problems.

It will be very helpful if you share any experience you have with protractor and electron.
Unfortunately I found a very little information in google and most are unanswered questions...

Regards,
Elena

@MoniRaj1
Copy link

MoniRaj1 commented Aug 5, 2020

Hi ,

I m looking for a similar solution as above.

We are trying to automate a electronjs desktop application using protractor , any help would be great.

Thanks,
Monica

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment