IE intstances is not working with protractor e2e - protractor

I have version :-
protractor 5.4.2
webdriver-manager version is 12.1.7
angular 7.2.4
Steps to run our app on IE:
run webdriver-manager update --ie
IEdriverserver.exe is 3.150.1 ,
standalone service is 3.14.59 jar
geckodriver-v0.26.0.exe
chromedriver_79.0.3945.36.zip
run webdriver-manager start --ie
open another terminal and run ng e2e
the error was:
Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
i 「wdm」: Compiled successfully.
[12:05:28] I/launcher - Running 1 instances of WebDriver
[12:05:28] I/local - Starting selenium standalone server...
[12:05:29] I/local - Selenium standalone server started at http://10.154.204.250:52076/wd/hub
[12:05:29] E/launcher - Unable to create new service: InternetExplorerDriverService
os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201'
Driver info: driver.version: unknown
[12:05:29] E/launcher - SessionNotCreatedError: Unable to create new service: InternetExplorerDriverService
can you help me why I am receiving this error and how I can fix this?

Related

I am running protractor on a chromebook : the error message tells me error:cannot find Chrome Binary?

While attempting to run protractor i get an error where it cant find chrome binary. Its a chromebook so the binary should already exist right?
why am i getting this error ?
Been looking around there doesnt seem to be any info.
[23:57:28] I/launcher - Running 1 instances of WebDriver
[23:57:28] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[23:57:29] E/launcher - unknown error: cannot find Chrome binary
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'penguin', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.44-04933-g0fb17cd4e23f', java.version: '11.0.4'
Driver info: driver.version: unknown
remote stacktrace: #0 0x5bad641316e9 <unknown>
[23:57:29] E/launcher - WebDriverError: unknown error: cannot find Chrome binary
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'penguin', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.44-04933-g0fb17cd4e23f', java.version: '11.0.4'
Driver info: driver.version: unknown
remote stacktrace: #0 0x5bad641316e9 <unknown>
at Object.checkLegacyResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)
at doSend.then.response (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:441:30)
at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: WebDriver.createSession()
at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:761:15)
at createDriver (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:170:33)
at Builder.build (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:626:16)
at Hosted.getNewDriver (/usr/lib/node_modules/protractor/built/driverProviders/driverProvider.js:53:33)
at Runner.createBrowser (/usr/lib/node_modules/protractor/built/runner.js:195:43)
at q.then.then (/usr/lib/node_modules/protractor/built/runner.js:339:29)
at _fulfilled (/usr/lib/node_modules/protractor/node_modules/q/q.js:834:54)
at /usr/lib/node_modules/protractor/node_modules/q/q.js:863:30
at Promise.promise.promiseDispatch (/usr/lib/node_modules/protractor/node_modules/q/q.js:796:13)
[23:57:29] E/launcher - Process exited with error code 199
It is looking for chrome browser to run the test. In windows and Mac , if you have chrome browser version, which you are passing in protractor capability, installed in your system, then test run on it by default.
But You can set the chrome binary path as desired also by adding below property in your protractor.conf.js file
"chromeOptions": {
binary: 'Path_to_Chrome_binaries',
args: [],
extensions: [],
}
Note, binary: 'Path_to_Chrome_binaries' , here 'Path_to_Chrome_binaries' should be the path to Chrome.exe
You also need to make sure the webdriver-manager version is compatible with the chrome browser you are using to tun your test upon.
If this does not solves your issue then please provide the protractor.conf.js file while will help in answering rh2 question/debughing the issue.

Protractor Unable to execute test cases in Chome using webdriver-manager

Protractor is unable to start test cases in chrome browser using webdriver-manager.
I followed the instructions given here https://www.protractortest.org/#/
and faced the below error.
debarnab#debarnab-Aspire-A515-51G:~/ProtractorConnectionTesting$ protractor conf.js
[19:33:57] I/launcher - Running 1 instances of WebDriver
[19:33:57] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[19:33:57] E/launcher - unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.15.0-45-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 59 milliseconds
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'debarnab-Aspire-A515-51G', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-45-generic', java.version: '1.8.0_201'
Driver info: driver.version: unknown
[19:33:57] E/launcher - WebDriverError: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.15.0-45-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 59 milliseconds
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'debarnab-Aspire-A515-51G', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-45-generic', java.version: '1.8.0_201'
Driver info: driver.version: unknown
at Object.checkLegacyResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)
at doSend.then.response (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:441:30)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
From: Task: WebDriver.createSession()
at Function.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
at Function.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:761:15)
at createDriver (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:170:33)
at Builder.build (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:626:16)
at Hosted.getNewDriver (/usr/local/lib/node_modules/protractor/built/driverProviders/driverProvider.js:53:33)
at Runner.createBrowser (/usr/local/lib/node_modules/protractor/built/runner.js:195:43)
at q.then.then (/usr/local/lib/node_modules/protractor/built/runner.js:339:29)
at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:796:13)
[19:33:57] E/launcher - Process exited with error code 199
conf.ts file
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['todo-spec.js']
};
spec file
describe('angularjs homepage todo list', function() {
it('should add a todo', function() {
browser.get('https://angularjs.org');
element(by.model('todoList.todoText')).sendKeys('write first protractor test');
element(by.css('[value="add"]')).click();
var todoList = element.all(by.repeater('todo in todoList.todos'));
expect(todoList.count()).toEqual(3);
expect(todoList.get(2).getText()).toEqual('write first protractor test');
// You wrote your first test, cross it off the list
todoList.get(2).element(by.css('input')).click();
var completedAmount = element.all(by.css('.done-true'));
expect(completedAmount.count()).toEqual(2);
});
});
I am using Ubutu machine and trying to run a basic scenario. Selenium Server seems to be up and running in http://localhost:4444/, as mentioned. Can any one please suggest ?
Make your config as below
exports.config = {
directConnect: true,
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome'
},
// Framework to use. Jasmine is recommended.
framework: 'jasmine',
// Spec patterns are relative to the current working directory when
// protractor is called.
specs: ['example_spec.js'],
// Options to be passed to Jasmine.
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
Run npm i webdriver-manager & webdriver-manager update from your project folder.
if you get No Update config found error when trying to run the test run node node_modules/protractor/bin/webdriver-manager update
Now run your test
Hope it helps you
From this answer it appears that you can add --disable-dev-shm-usage when running on Linux machines to resolve this issue.
conf.js
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['todo-spec.js'],
capabilities: [
{
browserName: 'chrome',
chromeOptions: { args: ["--disable-dev-shm-usage"] },
},
};
Can you give this a try and let me know if it works? Thanks
Try running your job using the following chrome arg:
--capabilities.chromeOptions.args="no-sandbox"

Unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.34.522913

I am trying to run Protractor tests on centOS with headless chrome.
When I run the tests with "protractor conf.js" the system throws strange error:
[root#stage conf]# protractor conf.js
[10:17:16] I/launcher - Running 1 instances of WebDriver
[10:17:16] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[10:18:18] E/launcher - unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 3.10.0-6 93.5.2.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.12 seconds
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'stage', ip: '10.10.19.203', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-693 .5.2.el7.x86_64', java.version: '1.8.0_151'
Driver info: driver.version: unknown
[10:18:18] E/launcher - WebDriverError: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 3.10.0-6 93.5.2.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.12 seconds
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'stage', ip: '10.10.19.203', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-693 .5.2.el7.x86_64', java.version: '1.8.0_151'
Driver info: driver.version: unknown
at WebDriverError (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:27:5)
at Object.checkLegacyResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/err or.js:546:15)
at parseHttpResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509: 13)
at doSend.then.response (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:4 41:30)
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.createSession()
at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriv er.js:769:24)
at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:7 61:15)
at createDriver (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:170:33)
at Builder.build (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:626:16)
at Hosted.getNewDriver (/usr/lib/node_modules/protractor/built/driverProviders/driverProvider.js:53:33)
at Runner.createBrowser (/usr/lib/node_modules/protractor/built/runner.js:195:43)
at q.then.then (/usr/lib/node_modules/protractor/built/runner.js:339:29)
at _fulfilled (/usr/lib/node_modules/protractor/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/usr/lib/node_modules/protractor/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/usr/lib/node_modules/protractor/node_modules/q/q.js:796:13)
[10:18:18] E/launcher - Process exited with error code 199
I am using:
Chromedriver v 2.34.522913,
CentOS Linux release 7.4.1708 (Core),
Protractor Version 5.2.0
I believe that this might be CentosOS issue with chrome.
If i would be you - i would check if chrome is actually installed normally: https://www.tecmint.com/install-google-chrome-on-redhat-centos-fedora-linux/
And also you might consider using Chromium instead Chrome, since i heard that Chrome might not work well on CentosOS:
https://www.hiroom2.com/2017/08/11/centos-7-chromium-en/
Chromedriver would be same for Chrome and Chromium
Another option might be to run Chrome in Docker Container

Protractor: setSize() failing with "WebDriverError: disconnected: unable to connect to renderer"

Starting October 18th upon upgrading to Chrome 62 my protractor suite started failing with:
WebDriverError: disconnected: unable to connect to renderer
when I called
WebDriver.manage().window().setSize(1280, 1480)
Full stack trace:
Stack Trace:
Running "protractor:default" (protractor) task
[10:48:23] I/launcher - Running 1 instances of WebDriver
[10:48:23] I/direct - Using ChromeDriver directly...
protractor startup failure: WebDriverError: disconnected: unable to connect to renderer
(Session info: chrome=62.0.3202.62)
(Driver info: chromedriver=2.32.498537 (cb2f855cbc7b82e20387eaf9a43f6b99b6105061),platform=Mac OS X 10.12.6 x86_64)
[10:48:24] E/launcher - Error: WebDriverError: disconnected: unable to connect to renderer
(Session info: chrome=62.0.3202.62)
(Driver info: chromedriver=2.32.498537 (cb2f855cbc7b82e20387eaf9a43f6b99b6105061),platform=Mac OS X 10.12.6 x86_64)
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.manage().window().setSize(1280, 1480)
at setWindowDimensions (/Users/kyle/projects/c/web/build/config/protractor-conf.js:95:43)
at onPrepare (/Users/kyle/projects/c/web/build/config/protractor-conf.js:71:12)
at Function.promise (/Users/kyle/projects/c/web/node_modules/q/q.js:682:9)
at _fulfilled (/Users/kyle/projects/c/web/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/Users/kyle/projects/c/web/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/Users/kyle/projects/c/web/node_modules/q/q.js:796:13)
at /Users/kyle/projects/c/web/node_modules/q/q.js:556:49
at runSingle (/Users/kyle/projects/c/web/node_modules/q/q.js:137:13)
at flush (/Users/kyle/projects/c/web/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
[10:48:24] E/launcher - Process exited with error code 100
Env Info:
ChromeDriver: chromedriver=2.32.498537 (cb2f855cbc7b82e20387eaf9a43f6b99b6105061), platform=Mac OS X 10.12.6 x86_64
Chrome : 62.0.3202.62
Protractor: 5.1.2 (connecting directly to chromedriver)
Node: v6.9.5
Upgrading to chromedriver 2.33 fixed my issue.
To specify a version when running webdriver-manager :
webdriver-manager update --versions.chrome 2.33

Run protractor test script in multiple nodes (os platform) via selenium grid

I am currently trying to run Protractor test script using selenium grid. My goal is to distribute Protractor test scripts to multiple nodes running under different flavor of OS. It should also run different parts of test script in parallel to save execution time. Current setup works when I use webdriver-manager to distribute test with multiple instances, but webdriver-manager would let me use only one node. I know it's possible to overcome this issue with selenium grid, but I am having following errors test console:
node_modules/selenium-webdriver/error.js:26
constructor(opt_error) {
^
WebDriverError: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
at WebDriverError (./node_modules/selenium-webdriver/error.js:26:26)
at Object.checkLegacyResponse (./node_modules/selenium-webdriver/error.js:580:13)
at ./node_modules/selenium-webdriver/lib/webdriver.js:64:13
at Promise.invokeCallback_ (./node_modules/selenium-webdriver/lib/promise.js:1329:14)
at TaskQueue.execute_ (./node_modules/selenium-webdriver/lib/promise.js:2790:14)
at TaskQueue.executeNext_ (./node_modules/selenium-webdriver/lib/promise.js:2773:21)
at ./node_modules/selenium-webdriver/lib/promise.js:2652:27
at ./node_modules/selenium-webdriver/lib/promise.js:639:7
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.createSession()
at acquireSession (./node_modules/selenium-webdriver/lib/webdriver.js:62:22)
at Function.createSession (./node_modules/selenium-webdriver/lib/webdriver.js:295:12)
at Builder.build (./node_modules/selenium-webdriver/builder.js:458:24)
at [object Object].DriverProvider.getNewDriver (./node_modules/protractor/built/driverProviders/driverProvider.js:42:27)
at [object Object].Runner.createBrowser (./node_modules/protractor/built/runner.js:203:37)
at ./node_modules/protractor/built/runner.js:293:21
at _fulfilled (./node_modules/q/q.js:834:54)
at self.promiseDispatch.done (./node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (./node_modules/q/q.js:796:13)
at ./node_modules/q/q.js:556:49
[launcher] Process exited with error code 1
Also, selenium node that I registered complains with following messages:
$ java -jar /Users/user/Desktop/selenium-server-standalone-2.52.0.jar -role node -hub http://localhost:4444/grid/register Dwebdriver.chrome.driver="./node_modules/protractor/selenium/chromedriver_2.21" -browser "browserName=chrome,version=ANY,platform=MAC,maxInstances=20"
14:40:17.078 INFO - Launching a Selenium Grid node
14:40:17.126 INFO - Adding browserName=chrome,version=ANY,platform=MAC,maxInstances=20
14:40:17.515 INFO - Java: Oracle Corporation 25.74-b02
14:40:17.515 INFO - OS: Mac OS X 10.11.6 x86_64
14:40:17.521 INFO - v2.52.0, with Core v2.52.0. Built from revision 4c2593c
14:40:17.570 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform MAC
14:40:17.570 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform MAC
14:40:17.570 INFO - Driver class not found: com.opera.core.systems.OperaDriver
14:40:17.570 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
14:40:17.630 INFO - Selenium Grid node is up and ready to register to the hub
14:40:17.650 INFO - Starting auto registration thread. Will try to register every 5000 ms.
14:40:17.650 INFO - Registering the node to the hub: http://localhost:4444/grid/register
14:40:17.669 INFO - The node is registered to the hub and ready to use
14:41:32.968 INFO - Executing: [new session: Capabilities [{rootElement=*[ng-app], count=1, browserName=chrome, maxInstances=4, shardTestFiles=true}]])
14:41:32.977 INFO - Creating a new session for Capabilities [{rootElement=*[ng-app], count=1, browserName=chrome, maxInstances=4, shardTestFiles=true}]
14:41:32.998 WARN - Exception thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42'
System info: host: 'user-M-C19J', ip: '10.128.164.26', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_74'
Driver info: driver.version: unknown
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:183)
at org.openqa.selenium.remote.server.DefaultSession.<init>(DefaultSession.java:119)
at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:95)
at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:124)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:59)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:1)
at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:111)
at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:79)
at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:202)
at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:164)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.openqa.jetty.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.openqa.jetty.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:680)
at org.openqa.jetty.jetty.servlet.ServletHandler.handle(ServletHandler.java:571)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)
Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42'
System info: host: 'user-M-C19J', ip: '10.128.164.26', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_74'
Driver info: driver.version: unknown
at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:113)
at org.openqa.selenium.remote.server.DefaultDriverProvider.newInstance(DefaultDriverProvider.java:97)
at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
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.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:103)
... 9 more
Caused by: java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
at com.google.common.base.Preconditions.checkState(Preconditions.java:199)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:109)
at org.openqa.selenium.chrome.ChromeDriverService.access$0(ChromeDriverService.java:1)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:137)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:296)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:138)
... 14 more
14:41:33.002 WARN - Exception: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
this is my current configuration:
seleniumAddress: 'http://localhost:4444/wd/hub',
chromeDriver: './node_modules/protractor/selenium/chromedriver_2.21',
capabilities: {
'rootElement': '*[ng-app]',
'browserName': 'chrome', // chrome, firefox, or phantomjs
'shardTestFiles': true,
'maxInstances': 3
}
I ran the following command line to launch hub:
java -jar /Users/xxx/selenium-server-standalone-3.0.0-beta2.jar -role hub
and following is for running node:
java -jar /Users/xxx/selenium-server-standalone-3.0.0-beta2.jar -role node -hub http://localhost:4444/grid/register
Chrome driver is under: /node_modules/protractor/selenium/chromedriver_2.21
Has anyone successfully configure protractor with selenium grid?
Webdriver_manager is bundled in npm as a quick solution for starting server and is not a comprehensive solution as Selenium Grid. Grid should be used for all professional distributed execution environment.
Check this link for response from Julie
Webdriver-Manager doesn't have options for hub & node
And regarding Protractor with Selenium Grid, I did use local Grid and also Sauce Labs.
You should pass the chrome driver property when initializing the node.
java -jar /Users/xxx/selenium-server-standalone-3.0.0-beta2.jar -role node -hub http://*******:4444/grid/register/ -Dwebdriver.chrome.driver=C:/Users/<>/AppData/Roaming/npm/node_modules/protractor/selenium/chromedriver.exe
The protractor Conf - chromedriver option is not passed over grid and it works for only webdriver-manager.