{"action":"opened","issue":{"url":"https://api.github.com/repos/jsdevel/webdriver-sync/issues/124","labels_url":"https://api.github.com/repos/jsdevel/webdriver-sync/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/jsdevel/webdriver-sync/issues/124/comments","events_url":"https://api.github.com/repos/jsdevel/webdriver-sync/issues/124/events","html_url":"https://github.com/jsdevel/webdriver-sync/issues/124","id":101725166,"number":124,"title":"Possible tu use with Electron?","user":{"login":"LeMoussel","id":1816573,"avatar_url":"https://avatars.githubusercontent.com/u/1816573?v=3","gravatar_id":"","url":"https://api.github.com/users/LeMoussel","html_url":"https://github.com/LeMoussel","followers_url":"https://api.github.com/users/LeMoussel/followers","following_url":"https://api.github.com/users/LeMoussel/following{/other_user}","gists_url":"https://api.github.com/users/LeMoussel/gists{/gist_id}","starred_url":"https://api.github.com/users/LeMoussel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeMoussel/subscriptions","organizations_url":"https://api.github.com/users/LeMoussel/orgs","repos_url":"https://api.github.com/users/LeMoussel/repos","events_url":"https://api.github.com/users/LeMoussel/events{/privacy}","received_events_url":"https://api.github.com/users/LeMoussel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-18T18:52:00Z","updated_at":"2015-08-18T18:52:00Z","closed_at":null,"body":"Possible to use webdriver-sync with [Electron](https://github.com/atom/electron) & chromedriver binary?\r\n\r\nUsage of selenium-webdriver with Electron is basically the same with upstream, except that you have to manually specify how to connect chrome driver and where to find Electron's binary:\r\n[selenium-webdriver](http://seleniumhq.github.io/selenium/docs/api/javascript/) provided a Node package for Electron with web driver.\r\n\r\n**An example**\r\n\r\n```javascript\r\nvar webdriver = require('selenium-webdriver');\r\n\r\nvar driver = new webdriver.Builder()\r\n  // The \"9515\" is the port opened by chrome driver.\r\n  .usingServer('http://localhost:9515')\r\n  .withCapabilities({chromeOptions: {\r\n    // Here is the path to your Electron binary.\r\n    binary: '/Path-to-Your-App.app/Contents/MacOS/Atom'}})\r\n  .forBrowser('electron')\r\n  .build();\r\n\r\ndriver.get('http://www.google.com');\r\ndriver.findElement(webdriver.By.name('q')).sendKeys('webdriver');\r\ndriver.findElement(webdriver.By.name('btnG')).click();\r\ndriver.wait(function() {\r\n return driver.getTitle().then(function(title) {\r\n   return title === 'webdriver - Google Search';\r\n });\r\n}, 1000);\r\n\r\ndriver.quit();\r\n```"}}