Electron app with protractor end-to-end testing

自作多情 提交于 2019-12-03 03:30:47

Adapting the instructions documented at Using Selenium and WebDriver, here is what you need to put into your protractor config (using directConnect, as an example):

exports.config = {
    directConnect: true,

    capabilities: {
         browserName: "chrome",
         chromeOptions: {
             binary: '/Path-to-Your-App.app/Contents/MacOS/Atom'  // < IMPORTANT! 
         },  
    },

    // ...
}

(not tested)

alecxe's answer is mostly correct, but there's one slight inaccuracy with it.

binary should be nested under chromeOptions like so:

exports.config = {
  directConnect: true,

  capabilities: {
     browserName: "chrome",
     chromeOptions: {
       binary: '/Path-to-Your-App.app/Contents/MacOS/Atom'  // < IMPORTANT!
     }
   },

  // ...
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!