karma-webdriver-over-ssh-launcher
v0.1.6
Published
A Karma plugin. Launcher for Remote WebDriver instances over ssh
Downloads
4
Maintainers
Readme
karma-webdriver-over-ssh-launcher
A plugin for Karma to launch Remote WebDriver instances over ssh host
Usage
$ npm install karma-webdriver-over-ssh-launcher
Basically, this is the same as karma-wedriver-launcher, with one extra feature - by defining tunnel
object in our karma config -
module.exports = function(karma) {
var webdriverConfig = {
hostname: 'ondemand.saucelabs.com',
port: 80,
user: 'USERNAME',
pwd: 'APIKEY'
}
config.set({
tunnel: {
hostname: "some-remote-server",
port: 8000 // port of "some-remote-server"
// or range of ports -
port: [8000, 9000]
},
customLaunchers: {
'IE7': {
base: 'SSHWebDriver', // Not 'WebDriver' but 'SSHWebDriver'
config: webdriverConfig,
browserName: 'internet explorer',
platform: 'Windows XP',
version: '10',
'x-ua-compatible': 'IE=EmulateIE7',
name: 'Karma',
pseudoActivityInterval: 30000
}
},
browsers: ['IE7'],
...
});
});
You can proxy all your some-remote-server:8000
requests to localhost:9876
. Or use it as simple karma-wedriver-launcher
by specifing tunnel
value to false
:-).
Why?
In some cases, your selenium grid might have access to some-remote-server:8000
, but might not have one to your-host:9876
.