Last active
December 4, 2015 22:17
Revisions
-
kevinsawicki revised this gist
Dec 4, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,5 +3,6 @@ Steps to reproduce: - Run `npm install` - Run `chromedriver --url-base=wd/hub --port=9515` to start ChromeDriver - Run `./run.sh` to see it working when launched directly - Run `./test.sh` to see it fail when launched via ChromeDriver -
kevinsawicki revised this gist
Dec 4, 2015 . 3 changed files with 13 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,4 +3,5 @@ Steps to reproduce: - Run `npm install` - Run `./run.sh` to see it working when launched directly - Run `./test.sh` to see it fail when launched via ChromeDriver This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,4 +7,4 @@ cp index.html node_modules/electron-prebuilt/dist/Electron.app/Contents/Resource cp main.js node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/app cp package.json node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/app open node_modules/electron-prebuilt/dist/Electron.app This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ #!/usr/bin/env bash set -ex mkdir -p node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/app cp index.html node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/app cp main.js node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/app cp package.json node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/app node test.js -
kevinsawicki revised this gist
Dec 4, 2015 . 7 changed files with 89 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ node_modules This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,6 @@ # Require issue with ChromeDriver Steps to reproduce: - Run `npm install` - Run `./run.sh` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ <!DOCTYPE html> <html lang="en"> <head> <script type="text/javascript"> function requireElectron() { try { require('electron') document.write('require(\'electron\') succeeded') } catch (error) { document.write('require(\'electron\') failed') document.write('<pre>' + error.stack + '</pre>') } } </script> </head> <body onload="requireElectron()"> </body> </html> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ var app = require('app') var BrowserWindow = require('browser-window') var fs = require('fs') var http = require('http') var path = require('path') var server = http.createServer(function (request, response) { if (request.url === '/index.html') { response.writeHead(200, {'Content-Type': 'text/html'}) response.end(fs.readFileSync(path.join(__dirname, 'index.html'))) } else { response.writeHead(404) response.end() } }) app.on('ready', function () { server.listen(8000, '127.0.0.1', function () { var mainWindow = new BrowserWindow({ width: 640, height: 480, title: 'Require issue' }) mainWindow.loadURL('http://127.0.0.1:8000/index.html') }) }); app.on('will-quit', function () { server.close() }) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ { "name": "require-failure-using-chromedriver", "version": "1.0.0", "main": "main.js", "dependencies": { "electron-chromedriver": "^0.35.0", "electron-prebuilt": "^0.35.4", "webdriverio": "^3.3.0" } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ #!/usr/bin/env bash set -ex mkdir -p node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/app cp index.html node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/app cp main.js node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/app cp package.json node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/app node test.js This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ var path = require('path') var webdriverio = require('webdriverio') var options = { host: "localhost", port: 9515, desiredCapabilities: { browserName: 'chrome', chromeOptions: { binary: path.join(__dirname, 'node_modules', '.bin', 'electron') } } } var client = webdriverio.remote(options) client.init() -
kevinsawicki created this gist
Dec 4, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ initial