Comparing version 0.3.1 to 0.3.2
@@ -17,5 +17,3 @@ var Nemo = require("../"); | ||
targetServer: "localhost", | ||
serverProps: { | ||
"port": 4444 | ||
}, | ||
localServer: true, | ||
seleniumJar: "/usr/bin/selenium-server-standalone.jar", | ||
@@ -34,2 +32,2 @@ targetBaseUrl: "https://www.paypal.com" | ||
}); | ||
}); | ||
}); |
{ | ||
"name": "nemo", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Abstraction for automation test components", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -25,3 +25,3 @@ # Nemo [![Build Status](https://travis-ci.org/paypal/nemo.svg)](https://travis-ci.org/paypal/nemo) | ||
```javascript | ||
"nemo": "^0.3.0.alpha", | ||
"nemo": "^0.3.1", | ||
``` | ||
@@ -146,3 +146,13 @@ | ||
``` | ||
### proxyDetails (optional) | ||
If you want to run test by setting proxy in the browser, you can use 'proxyDetails' configuration. Following options are available: direct, manual, pac and system. | ||
Default is 'direct'. For more information refer : https://selenium.googlecode.com/git/docs/api/javascript/module_selenium-webdriver_proxy.html | ||
```javascript | ||
"proxyDetails" : { | ||
method: "manual", | ||
args: [{"http": "localhost:9001","ftp":"localhost:9001","https":"localhost:9001"}] | ||
} | ||
``` | ||
## Plugins | ||
@@ -149,0 +159,0 @@ |
@@ -20,2 +20,3 @@ /*───────────────────────────────────────────────────────────────────────────*\ | ||
SeleniumServer = require('selenium-webdriver/remote').SeleniumServer, | ||
proxy = require('selenium-webdriver/proxy'), | ||
debug = require('debug'), | ||
@@ -45,2 +46,3 @@ log = debug('nemo:log'), | ||
serverJar = nemoData.seleniumJar, | ||
proxyDetails = nemoData.proxyDetails, | ||
errorObject = null; | ||
@@ -90,2 +92,14 @@ | ||
function getProxy(){ | ||
if (proxyDetails) { | ||
if (proxyDetails.method && proxy[proxyDetails.method]){ | ||
return proxy[proxyDetails.method].apply(proxy, proxyDetails.args); | ||
}else{ | ||
throw new Error('nemo: proxy configuration is incomplete or does not match the selenium-webdriver/proxy API'); | ||
} | ||
} else { | ||
return proxy.direct(); | ||
} | ||
} | ||
@@ -96,3 +110,3 @@ try { | ||
usingServer(getServer()). | ||
withCapabilities(getCapabilities()).build(); | ||
withCapabilities(getCapabilities()).setProxy(getProxy()).build(); | ||
} catch (err) { | ||
@@ -99,0 +113,0 @@ error('Encountered an error during driver setup: %', err); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48191
27
931
286
10