Protractor can't run in Firefox (works fine in Chrome) - selenium

While trying to run my very simple test suite that I've finally started building out -- I'm receiving this amongst the error log:
WebDriverError: Firefox option was set, but is not a FirefoxOption: {}
I'm running the following versions:
Node v7.5.0
Protractor v5.1.1
Selenium Webdriver v3.0.1
Firefox v45.0.1 and now v51.0.1
Full error dump:
[00:44:20] I/testLogger - [firefox #11] PID: 77949
[firefox #11] Specs: /Users/meetbryce/Dropbox (Personal)/Code/Projects/HelloMetrics/utm-link-manager/protractor/auth/login.spec.js
[firefox #11]
[firefox #11] (node:77949) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[firefox #11] [00:44:20] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[firefox #11]
[firefox #11] /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:505
[firefox #11] throw new ctor(message);
[firefox #11] ^
[firefox #11] WebDriverError: Firefox option was set, but is not a FirefoxOption: {}
[firefox #11] Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
[firefox #11] System info: host: 'bryceyork.local', ip: '10.40.66.60', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.1', java.version: '1.8.0_91'
[firefox #11] Driver info: driver.version: FirefoxDriver
[firefox #11] at Object.checkLegacyResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:505:15)
[firefox #11] at parseHttpResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)
[firefox #11] at doSend.then.response (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:440:13)
[firefox #11] at process._tickCallback (internal/process/next_tick.js:103:7)
[firefox #11] From: Task: WebDriver.createSession()
[firefox #11] at Function.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:777:24)
[firefox #11] at Function.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/firefox/index.js:640:55)
[firefox #11] at createDriver (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:167:33)
[firefox #11] at Builder.build (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:629:16)
[firefox #11] at Hosted.getNewDriver (/usr/local/lib/node_modules/protractor/built/driverProviders/driverProvider.js:52:33)
[firefox #11] at Runner.createBrowser (/usr/local/lib/node_modules/protractor/built/runner.js:194:43)
[firefox #11] at q.then.then (/usr/local/lib/node_modules/protractor/built/runner.js:338:29)
[firefox #11] at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:834:54)
[firefox #11] at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:863:30)
[firefox #11] at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:796:13)
[00:44:20] I/testLogger -
[00:44:20] E/launcher - Runner process exited unexpectedly with error code: 1
[00:44:20] I/launcher - 1 instance(s) of WebDriver still running
..[00:44:27] I/testLogger -
------------------------------------
[00:44:27] I/testLogger - [chrome #01] PID: 77948
[chrome #01] Specs: /Users/meetbryce/Dropbox (Personal)/Code/Projects/HelloMetrics/utm-link-manager/protractor/auth/login.spec.js
[chrome #01]
[chrome #01] (node:77948) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[chrome #01] [00:44:20] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[chrome #01] Started
[chrome #01] log: []
[chrome #01] log: []
[chrome #01]
[chrome #01]
[chrome #01]
[chrome #01] 2 specs, 0 failures
[chrome #01] Finished in 5.816 seconds
[chrome #01]
[00:44:27] I/testLogger -
[00:44:27] I/launcher - 0 instance(s) of WebDriver still running
[00:44:27] I/launcher - firefox #11 failed with exit code: 1
[00:44:27] I/launcher - chrome #01 passed
[00:44:27] I/launcher - overall: 1 process(es) failed to complete
[00:44:27] E/launcher - Process exited with error code 100
Process finished with exit code 100
Here's my protractor config in case that's important:
exports.config = {
framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['**/*.spec.js'],
multiCapabilities: [
{
'browserName': 'chrome',
'loggingPrefs': {
'driver': 'WARNING',
'server': 'WARNING',
'browser': 'SEVERE'
}
},
{
'browserName': 'firefox'
}
]
};

Had the exact same problem.
Launched today a "webdriver-manager update"
And then everything worked fine
EDIT:
update command

Sorry cant comment can only answer - someone in the past seems to have had a similar issue:
https://github.com/seleniumhq/selenium/issues/3115
I can also reproduce this - And I've also recently done a webdriver-manager update

For any Firefox versions below v48 you'll need to run with the legacy FirefoxDriver. Setting marionette: false as #FCin suggested in his comment will tell selenium-webdriver to use the legacy FirefoxDriver, but it will later fail with the error you described because it can't run using the Standalone Selenium Server. To get it to work you'll also need to remove the seleniumAddress from your config and replace it with directConnect: true like so:
exports.config = {
framework: 'jasmine',
directConnect: true,
specs: ['**/*.spec.js'],
multiCapabilities: [
{
'browserName': 'chrome',
'loggingPrefs': {
'driver': 'WARNING',
'server': 'WARNING',
'browser': 'SEVERE'
}
},
{
'browserName': 'firefox'
}
]
};
Unfortunately, a bug was introduced in Protractor v5.1.0 that broke the integration with the legacy FirefoxDriver. You'll need to downgrade it to v5.0.0 if you want to run on Firefox v45.0.1

add the following in your conf file
capabilities: {browserName: 'firefox'}

Related

Getting SessionNotCreatedError when trying to run scripts from Jenkins pipeline

I am trying to run my protractor scripts on jenkins pipeline and getting the SessionNotCreatedError when it tries to access the Selenium address. When I run the same on local its working fine. Not sure what's going on.
Conf.js script
let domainName = util.domainName;
exports.config = {
seleniumAddress: 'http://selenium-hub:4444/wd/hub', //for testing in the pipeline
directConnect: false, // Set to true for local testing, or provide a link to a running selenium grid.
// specs: ['e2e/**/mailbox-test.js', 'e2e/**/email-dumps-test.js'],
specs: ['e2e/**/*-test.js'],
capabilities: {
browserName: 'chrome',
acceptInsecureCerts: true,
'goog:chromeOptions': {
w3c: false,
args: [
'--no-sandbox',
'--headless',
'--disable-gpu',
'--window-size=1200,1200',
'--disable-dev-shm-usage',
'--allow-insecure-localhost',
'--allow-running-insecure-content',
'--ignore_ssl',
'--user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36',
],
},
},
allScriptsTimeout: 600000,
baseUrl: eaUrl,
framework: 'jasmine',
jasmineNodeOpts: {
isVerbose: true,
showColors: true,
includeStackTrace: true,
defaultTimeoutInterval: 600000,
stackTrace: false
},
Jenkins output error
[15:32:21] D/launcher - Protractor version: 5.4.2 10:31:59 [15:32:21]
D/launcher - Your base url for tests is
https://ea-webapp-int-raven.ocp-nonprod.ice.dhs.gov/ 10:31:59
[15:32:21] I/launcher - Running 1 instances of WebDriver 10:31:59
[15:32:21] I/hosted - Using the selenium server at
http://selenium-hub:4444/wd/hub 10:37:05 [15:37:21] E/launcher -
Could not start a new session. New session request timed out 10:37:05
Build info: version: '4.1.2', revision: '9a5a329c5a' 10:37:05 System
info: host: 'eb3088c85a9d', ip: '172.17.0.2', os.name: 'Linux',
os.arch: 'amd64', os.version: '3.10.0-1160.53.1.el7.x86_64',
java.version: '11.0.13' 10:37:05 Driver info: driver.version: unknown
10:37:05 [15:37:21] E/launcher - SessionNotCreatedError: Could not
start a new session. New session request timed out 10:37:05 Build
info: version: '4.1.2', revision: '9a5a329c5a' 10:37:05 System info:
host: 'eb3088c85a9d', ip: '172.17.0.2', os.name: 'Linux', os.arch:
'amd64', os.version: '3.10.0-1160.53.1.el7.x86_64', java.version:
'11.0.13' 10:37:05 Driver info: driver.version: unknown 10:37:05
at Object.throwDecodedError
(/app/test/node_modules/selenium-webdriver/lib/error.js:514:15)
10:37:05 at parseHttpResponse
(/app/test/node_modules/selenium-webdriver/lib/http.js:519:13)
10:37:05 at doSend.then.response
(/app/test/node_modules/selenium-webdriver/lib/http.js:441:30)
10:37:05 at process._tickCallback
(internal/process/next_tick.js:68:7) 10:37:05 From: Task:
WebDriver.createSession() 10:37:05 at Function.createSession
(/app/test/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
10:37:05 at Function.createSession
(/app/test/node_modules/selenium-webdriver/chrome.js:761:15) 10:37:05
at createDriver
(/app/test/node_modules/selenium-webdriver/index.js:170:33) 10:37:05
at Builder.build
(/app/test/node_modules/selenium-webdriver/index.js:626:16) 10:37:05
at Hosted.getNewDriver
(/app/test/node_modules/protractor/built/driverProviders/driverProvider.js:53:33)
10:37:05 at Runner.createBrowser
(/app/test/node_modules/protractor/built/runner.js:195:43) 10:37:05
at q.then.then
(/app/test/node_modules/protractor/built/runner.js:339:29) 10:37:05
at _fulfilled (/app/test/node_modules/q/q.js:834:54) 10:37:05 at
/app/test/node_modules/q/q.js:863:30 10:37:05 at
Promise.promise.promiseDispatch (/app/test/node_modules/q/q.js:796:13)
10:37:05 [15:37:21] E/launcher - Process exited with error code 199
10:37:05 10:37:05 exitStatus=$? 10:37:05 10:37:05 # Allow the
Jenkin pipeline to access and archive any test output. 10:37:05 chmod
-R 777 ./test_output/
I am adding my observations as others might need if they get similar issues and this might help them too. After a long long investigation of the console output in Jenkins with my docker installation scripts, I noticed that we are trying to install the latest version of the selenium hub and chrome node but the docker command doesn't include the SE_EVENT_BUS_HOST information. After changing my code from
docker run -d --name selenium-node-chrome -e HUB_HOST=selenium-hub --shm-size="2g" nexus2.xxx.com:18443/selenium/node-chrome
to
docker run -d --name selenium-node-chrome -e SE_EVENT_BUS_HOST=selenium-hub --shm-size="2g" -e SE_EVENT_BUS_PUBLISH_PORT=4442 -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 nexus2.xxx.com:18443/selenium/node-chrome
Then it started working for me.

Safari: Cannot establish new session

macOS: version 10.13.4
Safari: version 11.1
Selenium-standalone: version: 6.14.1
Summary: I'm getting "Cannot establish new session" in the driver logs when running automation on an instance of selenium-standalone that was started through a SSH.
Note: If you start selenium-standalone directly on the mac machine without SSH ing everything works perfectly
Steps to reproduce:
1) SSH into a mac device.
2) start selenium-standalone
command: selenium-standalone start -- -role node -nodeConfig safari.json
safari.json:
{
"capabilities":
[
{
"browserName": "safari",
"platform": "MAC",
"maxInstances": 1,
"seleniumProtocol": "WebDriver"
}
],
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 1,
"port": 5555,
"register": true,
"registerCycle": 5000,
"hub": "http://ReplaceWithHubUrl:4449",
"nodeStatusCheckTimeout": 5000,
"nodePolling": 5000,
"role": "node",
"host":"ReplacewithNodeIP",
"unregisterIfStillDownAfter": 60000,
"downPollingLimit": 2,
"debug": false,
"servlets" : [],
"withoutServlets": [],
"custom": {}
}
3) Run the automation (Of course pointed toward the hub)
selenium server logs:
12:12:41.490 INFO - Selenium build info: version: '3.8.1', revision: '6e95a6684b'
12:12:41.491 INFO - Launching a Selenium Grid node
2018-05-24 12:12:44.846:INFO::main: Logging initialized #3650ms to org.seleniumhq.jetty9.util.log.StdErrLog
12:12:44.871 INFO - Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`
12:12:44.877 INFO - Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
12:12:44.879 INFO - Using `new EdgeOptions()` is preferred to `DesiredCapabilities.edge()`
12:12:44.879 INFO - Driver class not found: com.opera.core.systems.OperaDriver
12:12:44.879 INFO - Using `new OperaOptions()` is preferred to `DesiredCapabilities.operaBlink()`
12:12:44.880 INFO - Using `new SafariOptions()` is preferred to `DesiredCapabilities.safari()`
12:12:44.880 INFO - Driver class not found: org.openqa.selenium.phantomjs.PhantomJSDriver
12:12:44.890 INFO - Driver provider class org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities {browserName: internet explorer, ensureCleanSession: true, platform: WINDOWS, version: } does not match the current platform MAC
12:12:44.890 INFO - Driver provider class org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities {browserName: MicrosoftEdge, platform: WINDOWS, version: } does not match the current platform MAC
12:12:44.911 INFO - Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
12:12:44.911 INFO - Using `new EdgeOptions()` is preferred to `DesiredCapabilities.edge()`
12:12:44.911 INFO - Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`
12:12:44.912 INFO - Using `new OperaOptions()` is preferred to `DesiredCapabilities.operaBlink()`
12:12:44.912 INFO - Using `new SafariOptions()` is preferred to `DesiredCapabilities.safari()`
12:12:44.917 INFO - Using the passthrough mode handler
2018-05-24 12:12:44.934:INFO:osjs.Server:main: jetty-9.4.7.v20170914
2018-05-24 12:12:44.950:WARN:osjs.SecurityHandler:main: ServletContext#o.s.j.s.ServletContextHandler#ba54932{/,null,STARTING} has uncovered http methods for path: /
2018-05-24 12:12:44.953:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler#ba54932{/,null,AVAILABLE}
2018-05-24 12:12:44.971:INFO:osjs.AbstractConnector:main: Started ServerConnector#d6e7bab{HTTP/1.1,[http/1.1]}{0.0.0.0:5555}
2018-05-24 12:12:44.971:INFO:osjs.Server:main: Started #3775ms
12:12:44.971 INFO - Selenium Grid node is up and ready to register to the hub
12:12:44.976 INFO - Starting auto registration thread. Will try to register every 5000 ms.
12:12:44.976 INFO - Registering the node to the hub: http://qa-docker02.avirat.net:4449/grid/register
12:12:44.987 INFO - The node is registered to the hub and ready to use
Selenium started
2018-05-24 12:12:49.235:INFO:osjshC.ROOT:qtp782378927-10: org.openqa.selenium.remote.server.WebDriverServlet-5e5d171f: Initialising WebDriverServlet
12:12:49.249 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession#5452a53c
12:12:49.251 INFO - /session: Executing POST on /session (handler: BeginSession)
12:12:49.295 INFO - Capabilities are: Capabilities {browserName: safari}
12:12:49.297 INFO - Capabilities {browserName: safari} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.safari.SafariDriverService)
Driver logs:
org.openqa.selenium.SessionNotCreatedException: Cannot establish new session
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'qa01.avirat.net', ip: 'fe80:0:0:0:1854:3678:a42:3622%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.4', java.version: '1.8.0_121'
Driver info: driver.version: unknown
Command duration or timeout: 52.01 seconds
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:545)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:209)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:132)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:145)
at cucumber.driver.Factory.createDriver(Factory.java:29)
at cucumber.support.Hooks.beforeScenario(Hooks.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at cucumber.runtime.Utils$1.call(Utils.java:31)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.Utils.invoke(Utils.java:25)
at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
at cucumber.runtime.HookDefinitionMatch.runStep(HookDefinitionMatch.java:17)
at cucumber.runner.UnskipableStep.executeStep(UnskipableStep.java:22)
at cucumber.api.TestStep.run(TestStep.java:83)
at cucumber.api.TestCase.run(TestCase.java:58)
at cucumber.runner.Runner.runPickle(Runner.java:80)
at cucumber.runtime.Runtime.runFeature(Runtime.java:119)
at cucumber.runtime.Runtime.run(Runtime.java:104)
at cucumber.api.cli.Main.run(Main.java:36)
at cucumber.api.cli.Main.main(Main.java:18)
Selenium Hub logs
starting selenium hub with configuration:
{
"host": null,
"port": 4444,
"role": "hub",
"maxSession": 50,
"newSessionWaitTimeout": 120000,
"capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
"throwOnCapabilityNotPresent": true,
"jettyMaxThreads": -1,
"cleanUpCycle": 60000,
"browserTimeout": 60000,
"timeout": 90000,
"debug": false
}
19:33:36.875 INFO - Selenium build info: version: '3.7.1', revision: '8a0099a'
19:33:36.878 INFO - Launching Selenium Grid hub
2018-05-24 19:33:37.883:INFO::main: Logging initialized #2333ms to org.seleniumhq.jetty9.util.log.StdErrLog
19:33:37.914 INFO - Will listen on 4444
2018-05-24 19:33:38.014:INFO:osjs.Server:main: jetty-9.4.5.v20170502
2018-05-24 19:33:38.081:INFO:osjs.session:main: DefaultSessionIdManager workerName=node0
2018-05-24 19:33:38.081:INFO:osjs.session:main: No SessionScavenger set, using defaults
2018-05-24 19:33:38.089:INFO:osjs.session:main: Scavenging every 600000ms
2018-05-24 19:33:38.107:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler#57d5872c{/,null,AVAILABLE}
2018-05-24 19:33:38.154:INFO:osjs.AbstractConnector:main: Started ServerConnector#1f1c7bf6{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
2018-05-24 19:33:38.155:INFO:osjs.Server:main: Started #2605ms
19:33:38.155 INFO - Nodes should register to http://10.255.1.238:4444/grid/register/
19:33:38.155 INFO - Selenium Grid hub is up and running
19:33:39.082 INFO - Registered a node http://10.57.85.10:5555
19:34:08.364 INFO - Got a request to create a new session: Capabilities {browserName: safari}
19:34:08.365 INFO - Trying to create a new session on test slot {seleniumProtocol=WebDriver, technologyPreview=false, se:CONFIG_UUID=c82e2553-dfdf-409c-8028-c76da8352368, browserName=safari, maxInstances=1, platform=MAC}
With High Sierra, I had to specify the specific OS version in platform, as well as the safari version as follows (in JS vs Java but same principle):
"safari": {
"browserName": "safari",
"platform": "macOS 10.13",
"version": "11.0",
"port": 4444
},
If this doesn't resolve the problem, the user you end up with on the mac you are SSHing into may not have sufficient permissions to run the driver.

Getting "org.openqa.selenium.WebDriverException: Error forwarding the new session Error forwarding the request Connect to" connecting hub with node

OS: Linux
Selenium Version:**3.12
**Browser: Chrome V66,
chromedriver 2.38
Following is my Grid configuration:
Hub(Linux) runs on Jenkins machine(https://jenkins.us.abc.edu) with Selenium Grid Jenkins plugin.
Now i am trying to register my Node with json like below and starting Node:
java -jar -Dwebdriver.chrome.driver=chromedriver selenium-rver-standalone-3.12.0.jar -role node -nodeConfig node.json
node.json
{
"capabilities":
[
{
"browserName": "firefox",
"maxInstances": 5,
"seleniumProtocol": "WebDriver"
},
{
"browserName": "chrome",
"maxInstances": 5,
"seleniumProtocol": "WebDriver"
},
{
"browserName": "internet explorer",
"maxInstances": 1,
"seleniumProtocol": "WebDriver"
}
],
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 5,
**"port": 17946,**
"register": true,
"registerCycle": 5000,
**"hub": "http://jenkins.us.abc.edu:4444",**
"nodeStatusCheckTimeout": 5000,
"nodePolling": 5000,
"role": "node",
"unregisterIfStillDownAfter": 60000,
"downPollingLimit": 2,
"debug": false,
"servlets" : [],
"withoutServlets": [],
"custom": {}
}
Following is Node console:
[uanem#usv-selapp-01 ~]$ java -jar -Dwebdriver.chrome.driver=chromedriver selenium-rver-standalone-3.12.0.jar -role node -nodeConfig node.json
09:37:49.054 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.12.0', revision: '7c6e0b3'
09:37:49.059 INFO [GridLauncherV3$3.launch] - Launching a Selenium Grid node on port 17946
2018-05-28 09:37:49.175:INFO::main: Logging initialized #490ms to org.seleniumhq.jetty9.util.log.StdErrLog
09:37:49.324 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 17946
09:37:49.324 INFO [GridLauncherV3$3.launch] - Selenium Grid node is up and ready to register to the hub
09:37:49.332 INFO [SelfRegisteringRemote$1.run] - Starting auto registration thread. Will try to register every 5000 ms.
09:37:49.332 INFO [SelfRegisteringRemote.registerToHub] - Registering the node to the hub: http://jenkins.us.umuc.edu:4444/grid/register
09:37:50.866 INFO [SelfRegisteringRemote.registerToHub] - Updating the node configuration from the hub
09:37:50.965 WARN [SelfRegisteringRemote.registerToHub] - error getting the parameters from the hub. The node may end up with wrong timeouts.hudson.plugins.selenium.JenkinsCapabilityMatcher could not be coerced to instance
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T15:15:08.936Z'
System info: host: 'usv-selapp-01.us.umuc.edu', ip: '10.190.33.90', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-862.el7.x86_64', java.version: '1.8.0_144'
Driver info: driver.version: unknown
09:37:50.965 INFO [SelfRegisteringRemote.registerToHub] - The node is registered to the hub and ready to use
09:39:11.333 INFO [SelfRegisteringRemote.registerToHub] - Registering the node to the hub: http://jenkins.us.umuc.edu:4444/grid/register
09:39:11.392 INFO [SelfRegisteringRemote.registerToHub] - Updating the node configuration from the hub
09:39:11.404 WARN [SelfRegisteringRemote.registerToHub] - error getting the parameters from the hub. The node may end up with wrong timeouts.hudson.plugins.selenium.JenkinsCapabilityMatcher could not be coerced to instance
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T15:15:08.936Z'
System info: host: 'usv-selapp-01.us.umuc.edu', ip: '10.190.33.90', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-862.el7.x86_64', java.version: '1.8.0_144'
Driver info: driver.version: unknown
09:39:11.405 INFO [SelfRegisteringRemote.registerToHub] - The node is registered to the hub and ready to use
09:40:31.602 INFO [SelfRegisteringRemote.registerToHub] - Registering the node to the hub: http://jenkins.us.umuc.edu:4444/grid/register
09:40:31.632 INFO [SelfRegisteringRemote.registerToHub] - Updating the node configuration from the hub
09:40:31.642 WARN [SelfRegisteringRemote.registerToHub] - error getting the parameters from the hub. The node may end up with wrong timeouts.hudson.plugins.selenium.JenkinsCapabilityMatcher could not be coerced to instance
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T15:15:08.936Z'
System info: host: 'usv-selapp-01.us.umuc.edu', ip: '10.190.33.90', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-862.el7.x86_64', java.version: '1.8.0_144'
Driver info: driver.version: unknown
09:40:31.642 INFO [SelfRegisteringRemote.registerToHub] - The node is registered to the hub and ready to use
09:41:51.809 INFO [SelfRegisteringRemote.registerToHub] - Registering the node to the hub: http://jenkins.us.umuc.edu:4444/grid/register
09:41:51.850 INFO [SelfRegisteringRemote.registerToHub] - Updating the node configuration from the hub
09:41:51.856 WARN [SelfRegisteringRemote.registerToHub] - error getting the parameters from the hub. The node may end up with wrong timeouts.hudson.plugins.selenium.JenkinsCapabilityMatcher could not be coerced to instance
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T15:15:08.936Z'
System info: host: 'usv-selapp-01.us.umuc.edu', ip: '10.190.33.90', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-862.el7.x86_64', java.version: '1.8.0_144'
Driver info: driver.version: unknown
09:41:51.856 INFO [SelfRegisteringRemote.registerToHub] - The node is registered to the hub and ready to use
Here i could see the node is connected hub in my Jenkins Selenium Grid page at "10.190.33.90"
Following is my sample script:
#Test
public void GoogleTest() throws Exception
{
System.out.println("I am in test");
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
System.out.println("I am after setting chromedriver path ");
**remoteWD = new RemoteWebDriver(new URL("http://usv-bmsapp-01.us.abc.edu:4444/wd/hub"), capabilities);**
**//remoteWD = new RemoteWebDriver(new URL("https://jenkins.us.abc.edu:4444/wd/hub"), capabilities);**
//remoteWD = new ChromeDriver();
System.out.println("I am after RMD");
remoteWD.get("http://www.google.com");
WebElement element = remoteWD.findElement(By.name("q"));
element.sendKeys("Selenium WebDriver");
element.submit();
Thread.sleep(10000);
System.out.println(remoteWD.getTitle());
remoteWD.quit();
}
Due to security reasons or whatever i am not able to connect "https://jenkins.us.abc.edu:4444/wd/hub", but when i give the server name like this "http://usv-bmsapp-01.us.abc.edu:4444/wd/hub" I am able to connect.
Following is the error message i am getting. Can someone help me where i am going wrong???
Running gridtest.GridTest
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator#7dc5e7b4
I am before test
I am in test
I am after setting chromedriver path
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 95.6 sec <<< FAILURE!
GoogleTest(gridtest.GridTest) Time elapsed: 94.334 sec <<< FAILURE!
org.openqa.selenium.WebDriverException: Error forwarding the new session Error forwarding the request Connect to 10.190.33.90:17946 [/10.190.33.90] failed: Connection timed out
Command duration or timeout: 92.06 seconds
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$24(ProtocolHandshake.java:359)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:362)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:136)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:586)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:217)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:140)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:153)
at gridtest.GridTest.GoogleTest(GridTest.java:49)
Caused by: org.openqa.selenium.WebDriverException: Error forwarding the new session Error forwarding the request Connect to 10.190.33.90:17946 [/10.190.33.90] failed: Connection timed out
Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T15:28:36.4Z'
System info: host: 'usv-bmsapp-01.us.umuc.edu', ip: '10.190.32.186', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-696.23.1.el6.x86_64', java.version: '1.8.0_77'
Driver info: driver.version: unknown
at org.openqa.grid.web.servlet.handler.RequestHandler.process(RequestHandler.java:117)
at org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:84)
at org.openqa.grid.web.servlet.DriverServlet.doPost(DriverServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:841)
at org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:535)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
at org.seleniumhq.jetty9.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
at org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
at org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:473)
at org.seleniumhq.jetty9.server.session.SessionHandler.doScope(SessionHandler.java:1564)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
at org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.seleniumhq.jetty9.server.Server.handle(Server.java:564)
at org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:317)
at org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:251)
at org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:110)
at org.seleniumhq.jetty9.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at org.seleniumhq.jetty9.util.thread.Invocable.invokePreferred(Invocable.java:128)
at org.seleniumhq.jetty9.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
at org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
at org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
at java.lang.Thread.run(Thread.java:745)
There seems to be a couple of issues which you ned to address as follows:
Selenium version
Logs in Node depicts:
Selenium version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T15:15:08.936Z'
Logs in Console depicts:
Selenium version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T15:28:36.4Z'
JDK version
Logs in Node depicts:
java.version '1.8.0_144'
Logs in Console depicts:
java.version '1.8.0_77'
Node startup command
The command which you have used to register the node looks error-pront as follows:
java -jar -Dwebdriver.chrome.driver=chromedriver selenium-rver-standalone-3.12.0.jar -role node -nodeConfig node.json
It should have been:
java -jar -Dwebdriver.chrome.driver=chromedriver selenium-server-standalone-3.12.0.jar -role node -nodeConfig node.json
Solution
Upgrade JDK in Selenium Grid Hub and Selenium Grid Node to recent levels JDK 8u171.
Upgrade Selenium Client in Selenium Grid Hub and _Selenium Grid Node_to current levels Version 3.12.0.
Upgrade ChromeDriver to current ChromeDriver v2.38 level.
Keep Chrome version at Chrome v66.x levels. (as per ChromeDriver v2.38 release notes)
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
Take a System Reboot.
Execute your #Test.
Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.
nodeConfig
To start simple you can reduce the nodeConfig i.e. node.json as follows:
{
"capabilities": [
{
"browserName": "firefox",
"maxInstances": 5,
"seleniumProtocol": "WebDriver"
},
{
"browserName": "chrome",
"maxInstances": 5,
"seleniumProtocol": "WebDriver"
},
{
"browserName": "internet explorer",
"maxInstances": 1,
"seleniumProtocol": "WebDriver"
}
],
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 5,
"port": 5566,
"host": ip,
"register": true,
"registerCycle": 5000,
"hubPort": 4444,
"hubHost": jenkins.us.abc.edu,
"timeout":120,
"browserTimeout":60
}

Unable to use Firefox v52.0 with Protractor

I am currently having an issue trying to run Protractor tests on my Angular2 site when using GeckoDriver.
I am using Selenium Standalone Server to run my tests and they work in Chrome and IE11 but when I try to run with Firefox I get the following error:
Failed: Error while running testForAngular: Error: Permission denied to access property "invoke"
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'MyPC', ip: '128.87.191.161', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\Me\AppData\Local\Temp\rust_mozprofile.UbDrIDtk4eEX, rotatable=false, timeouts={implicit=0, page load=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=52.0, platformVersion=6.1, moz:processID=12820, browserName=firefox, platformName=windows_nt}]
Session ID: 6ddf7356-5306-4db6-b6c2-2898406c3193
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'MyPC', ip: '128.87.191.161', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\Me\AppData\Local\Temp\rust_mozprofile.UbDrIDtk4eEX, rotatable=false, timeouts={implicit=0, page load=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=52.0, platformVersion=6.1, moz:processID=12820, browserName=firefox, platformName=windows_nt}]
Session ID: 6ddf7356-5306-4db6-b6c2-2898406c3193
at AbstractExtendedWebDriver.get.timeout.driver.controlFlow.execute.then.then.then.then.then.then.executeAsyncScript_.then (c:\Projects\Project\ProtractorTests\node_modules\protractor\lib\browser.ts:944:27)
at ManagedPromise.invokeCallback_ (c:\Projects\Project\ProtractorTests\node_modules\selenium-webdriver\lib\promise.js:1366:14)
at TaskQueue.execute_ (c:\Projects\Project\ProtractorTests\node_modules\selenium-webdriver\lib\promise.js:2970:14)
at TaskQueue.executeNext_ (c:\Projects\Project\ProtractorTests\node_modules\selenium-webdriver\lib\promise.js:2953:27)
at events.EventEmitter.events.EventEmitter.events.EventEmitter.scheduleCallbacks.asyncRun (c:\Projects\Project\ProtractorTests\node_modules\selenium-webdriver\lib\promise.js:2813:27)
at c:\Projects\Project\ProtractorTests\node_modules\selenium-webdriver\lib\promise.js:676:7
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: Run beforeEach in control flow
From asynchronous test:
Error
at Suite.<anonymous> (C:\Projects\Project\ProtractorTests\specs\login-spec.ts:10:5)
at Object.<anonymous> (C:\Projects\Project\ProtractorTests\specs\login-spec.ts:8:1)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Array.forEach (native)
If I try to run the Firefox tests using directConnet I get another error:
[09:37:35] E/launcher - Unable to parse new session response: {"value": {"sessionId":"b00ee8b7-434e-48e6-83a6-3bca08caba31","value":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"52.0","moz:accessibilityChecks":false,"moz:processID":15632,"moz:profile":"C:\\Users\\Me\\AppData\\Local\\Temp\\rust_mozprofile.XS9ezQUYQ7um","pageLoadStrategy":"normal","platformName":"windows_nt","platformVersion":"6.1","rotatable":false,"specificationLevel":0,"timeouts":{"implicit":0,"page load":300000,"script":30000}}}}
[09:37:35] E/launcher - WebDriverError: Unable to parse new session response: {"value": {"sessionId":"b00ee8b7-434e-48e6-83a6-3bca08caba31","value":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"52.0","moz:accessibilityChecks":false,"moz:processID":15632,"moz:profile":"C:\\Users\\Me\\AppData\\Local\\Temp\\rust_mozprofile.XS9ezQUYQ7um","pageLoadStrategy":"normal","platformName":"windows_nt","platformVersion":"6.1","rotatable":false,"specificationLevel":0,"timeouts":{"implicit":0,"page load":300000,"script":30000}}}}
at __dirname.execute.request.then.doSend.then.response (c:\Projects\Project\ProtractorTests\node_modules\selenium-webdriver\lib\http.js:445:19)
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.createSession()
at Function.createSession (c:\Projects\Project\ProtractorTests\node_modules\selenium-webdriver\lib\webdriver.js:777:24)
at Function.createSession (c:\Projects\Project\ProtractorTests\node_modules\selenium-webdriver\firefox\index.js:640:55)
at Direct.getNewDriver (c:\Projects\Project\ProtractorTests\node_modules\protractor\built\driverProviders\direct.js:95:33)
at Runner.createBrowser (c:\Projects\Project\ProtractorTests\node_modules\protractor\built\runner.js:194:43)
at events_1.EventEmitter.run.q.then.then (c:\Projects\Project\ProtractorTests\node_modules\protractor\built\runner.js:338:29)
at _fulfilled (c:\Projects\Project\ProtractorTests\node_modules\q\q.js:834:54)
at Promise.then.Q.nextTick.self.promiseDispatch.done (c:\Projects\Project\ProtractorTests\node_modules\q\q.js:863:30)
at Promise.__dirname.Promise.promise.promiseDispatch (c:\Projects\Project\ProtractorTests\node_modules\q\q.js:796:13)
at c:\Projects\Project\ProtractorTests\node_modules\q\q.js:556:49
at runSingle (c:\Projects\Project\ProtractorTests\node_modules\q\q.js:137:13)
[09:37:35] E/launcher - Process exited with error code 199
Not sure where to go from here!
Versions
Angular: 2.4.6
Protractor: 5.1.1
Selenium Standalone Server: 3.3.1
GeckoDriver: 0.15.0
Firefox Browser: 52.0
The Permission denied to access property "invoke" is a known issue in Zone.js, specific to Zone.js and Firefox running with WebDriver. It was fixed in the 0.8.7 release. The issue involves how Zone.js patches the browser, and the only fix is to upgrade.
The Unable to parse new session response is also a known issue with Firefox 52 and directConnect: true. Unfortunately, the only solution is to use Selenium Standalone.

Protractor not working for Safari on windows 7

I am trying to run protractor e2e test cases on safari with windows 7. its throwing following error:
[10:27:59] I/local - Starting selenium standalone server...
[10:27:59] I/launcher - Running 1 instances of WebDriver
[10:28:00] I/local - Selenium standalone server started at http://10.1.69.133:65294/wd/hub
[10:28:01] E/launcher - The best matching driver provider org.openqa.selenium.edge.EdgeDriver can't create a new driver instance for Capabilities [{
ceptSslCerts=true, trustAllSSLCertificates=true, name=safari-tests, count=1, browserName=safari, directConnect=false, sharedTestFiles=true}]
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'DENXD7OShore41p', ip: '10.1.69.133', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_112'
Driver info: driver.version: unknown
[10:28:01] E/launcher - WebDriverError: The best matching driver provider org.openqa.selenium.edge.EdgeDriver can't create a new driver instance for
apabilities [{acceptSslCerts=true, trustAllSSLCertificates=true, name=safari-tests, count=1, browserName=safari, directConnect=false, sharedTestFile
true}]
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'DENXD7OShore41p', ip: '10.1.69.133', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_112'
Driver info: driver.version: unknown
at WebDriverError (c:\Git\operator\ui\node_modules\selenium-webdriver\lib\error.js:27:5)
at Object.checkLegacyResponse (c:\Git\operator\ui\node_modules\selenium-webdriver\lib\error.js:639:15)
at parseHttpResponse (c:\Git\operator\ui\node_modules\selenium-webdriver\http\index.js:538:13)
at client_.send.then.response (c:\Git\operator\ui\node_modules\selenium-webdriver\http\index.js:472:11)
at ManagedPromise.invokeCallback_ (c:\Git\operator\ui\node_modules\selenium-webdriver\lib\promise.js:1379:14)
at TaskQueue.execute_ (c:\Git\operator\ui\node_modules\selenium-webdriver\lib\promise.js:2913:14)
at TaskQueue.executeNext_ (c:\Git\operator\ui\node_modules\selenium-webdriver\lib\promise.js:2896:21)
at asyncRun (c:\Git\operator\ui\node_modules\selenium-webdriver\lib\promise.js:2820:25)
at c:\Git\operator\ui\node_modules\selenium-webdriver\lib\promise.js:639:7
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.createSession()
at Function.createSession (c:\Git\operator\ui\node_modules\selenium-webdriver\lib\webdriver.js:329:24)
at Builder.build (c:\Git\operator\ui\node_modules\selenium-webdriver\builder.js:458:24)
at Local.DriverProvider.getNewDriver (c:\Git\operator\ui\node_modules\protractor\built\driverProviders\driverProvider.js:37:33)
at Runner.createBrowser (c:\Git\operator\ui\node_modules\protractor\built\runner.js:198:43)
at c:\Git\operator\ui\node_modules\protractor\built\runner.js:277:30
at _fulfilled (c:\Git\operator\ui\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (c:\Git\operator\ui\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (c:\Git\operator\ui\node_modules\q\q.js:796:13)
at c:\Git\operator\ui\node_modules\q\q.js:604:44
at runSingle (c:\Git\operator\ui\node_modules\q\q.js:137:13)
[10:28:01] E/launcher - Process exited with error code 199
Here is the code for my protractor.conf.js file. I made some changes in config after error, Like i added selenium address and removed acceptSslCerts=true, trustAllSSLCertificates=true but after that i am getting the same error.
/*global jasmine */
var SpecReporter = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
browserName: 'safari',
name: 'safari-tests',
directConnect: false,
seleniumAddress: 'http://localhost:4444/wd/hub'
},
maxInstances: 1,
baseUrl: 'http://localhost:3000/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 300000,
isVerbose : true,
includeStackTrace : true,
print: function() {}
},
useAllAngular2AppRoots: true,
onPrepare: function() {
require('ts-node').register({
project: 'e2e'
});
jasmine.getEnv().addReporter(new SpecReporter());
browser.ignoreSynchronization = true;
}
};
Does it require some other configuration to run it on Safari.
Safari for Windows was discontinued years ago and installing the old Safari 5 exe that's still around won't help you achieve anything useful regarding test automation.
So never download Safari from other that the official site else chances are you are getting a Trojan in it.
You can only test Safari using a Mac OSX or you can try Sauce Labs / BrowserStack / Testing Bot / other cloud test providers to test in browsers you don't have installed locally.