Starting node-huxley with example tests - node.js

I'm struggling to get node-huxley to run. Having installed it globally, I then installed the node-selenium driver, cloned the repo and tried to run Huxley on the examples. However I'm seeing this error.
It seems to suggest that the server isn't running, but I've verified it as running on localhost:8000 correctly. Any ideas how to debug this?
firefox opening.
At 1 type and toggle.hux
/usr/local/lib/node_modules/huxley/node_modules/selenium-webdriver/lib/webdriver/promise.js:1549
throw error;
^
Error: ECONNREFUSED connect ECONNREFUSED
at ClientRequest.<anonymous> (/usr/local/lib/node_modules/huxley/node_modules/selenium-webdriver/http/index.js:127:16)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1547:9)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:440:14
at process._tickCallback (node.js:415:13)
==== async task ====
WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession_ (/usr/local/lib/node_modules/huxley/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:49)
at Function.webdriver.WebDriver.createSession (/usr/local/lib/node_modules/huxley/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:111:30)
at Builder.build (/usr/local/lib/node_modules/huxley/node_modules/selenium-webdriver/builder.js:105:20)
at _open (/usr/local/lib/node_modules/huxley/source/browser/driver.js:28:6)
at Object.open (/usr/local/lib/node_modules/huxley/source/browser/driver.js:49:3)
at _openRunAndClose (/usr/local/lib/node_modules/huxley/index.js:76:11)
at /usr/local/lib/node_modules/huxley/index.js:169:5
at /usr/local/lib/node_modules/huxley/index.js:217:5
at /usr/local/lib/node_modules/huxley/source/playback/getPlaybackInfos.js:121:5

Have you started selenium? (https://github.com/chenglou/node-huxley#installation)

Related

unable to execute 'webdriver-manager update' for protractor

When i tried to installing protractor in my office PC, I am getting stuck at the step 'webdriver-manager update' in the command terminal.I did not face this obstacle when I tried the command in my personal laptop.The error thrown is as below,
C:\Users\616356>webdriver-manager update
[10:45:09] I/config_source - curl -o C:\Users\616356\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\standalone-response.xml
https://selenium-release.storage.googleapis.com/
[10:45:09] I/config_source - curl -o C:\Users\616356\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\chrome-response.xml
https://chromedriver.storage.googleapis.com/
[10:45:09] I/config_source - curl -o C:\Users\616356\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\gecko-response.json
https://api.github.com/repos/mozilla/geckodriver/releases
events.js:165
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED 172.217.166.112:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1174:14)
Emitted 'error' event at:
at Request.onRequestError (C:\Users\616356\AppData\Roaming\npm\node_modules\protractor\node_modules\request\request.js:881:8)
at ClientRequest.emit (events.js:185:15)
at TLSSocket.socketErrorListener (_http_client.js:395:9)
at TLSSocket.emit (events.js:180:13)
at emitErrorNT (internal/streams/destroy.js:64:8)
at process._tickCallback (internal/process/next_tick.js:178:19)
I think the issue might be regarding some firewall or proxy problem.I tried adding 172.217.166.112 in the proxy exceptions, it didn't work.I just don't know how to resolve this issue.Any suggestions would be appreciated.
example like this
webdriver-manager update --proxy http://TPESproxy.galileo.corp.lcl:8980

E/launcher - Process exited with error code 135

I am trying to run the protractor test from my windows machine.
Configuration Used:
OS : Windows 7
Node : 6.11.3
Protractor : 5.1.2
NPM : 3.10.10
I am unable to run the Protractor test because of the below error.
C:\Users\Admin>protractor conf.js [14:45:16] I/launcher - Running 1 instances of WebDriver [14:45:16] I/hosted - Using the selenium server at http://localhost:4444/wd/hub [14:45:18] E/launcher - Error code: 135 [14:45:18] E/launcher - Error message: ECONNREFUSED connect ECONNREFUSED 127.0.0 .1:4444 [14:45:18] E/launcher - Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
at ClientRequest.<anonymous> (C:\Users\Admin\AppData\Roaming\npm\node_module s\protractor\node_modules\selenium-webdriver\http\index.js:238:15)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at Socket.socketErrorListener (_http_client.js:310:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1277:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9) From: Task: WebDriver.createSession()
at Function.createSession (C:\Users\Admin\AppData\Roaming\npm\node_modules\p rotractor\node_modules\selenium-webdriver\lib\webdriver.js:777:24)
at Function.createSession (C:\Users\Admin\AppData\Roaming\npm\node_modules\p rotractor\node_modules\selenium-webdriver\chrome.js:709:29)
at createDriver (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\ node_modules\selenium-webdriver\index.js:167:33)
at Builder.build (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor \node_modules\selenium-webdriver\index.js:623:16)
at Hosted.getNewDriver (C:\Users\Admin\AppData\Roaming\npm\node_modules\prot ractor\lib\driverProviders\driverProvider.ts:60:29)
at Runner.createBrowser (C:\Users\Admin\AppData\Roaming\npm\node_modules\pro tractor\lib\runner.ts:225:39)
at q.then.then (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\l ib\runner.ts:391:27)
at _fulfilled (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\no de_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\Admin\AppData\Roaming\npm\node_module s\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\Admin\AppData\Roaming\npm\node_ modules\protractor\node_modules\q\q.js:796:13) [14:45:18]
***E/launcher - Process exited with error code 135***
I keep receiving the error "E/launcher - Process exited with error code 135" noted in the stack-trace above. How can I get the protractor test to complete successfully?
Try doing below steps:-
Open cmd and in the home path use below commands.
webdriver-manager clean
webdriver-manager status
webdriver-manager update
webdriver-manager start.
It looks like You can't connect to the selenium server. Comment this :
seleniumAddress: 'http://localhost:4444/wd/hub'
and replace it with:
directConnect: true,
just to check if is working directly.
Also You can navigate directly to http://localhost:4444/wd/hub to see If you can access there. If not it might be some firewall or something similar.
First, open a command prompt and then
run the following command:
webdriver-manager start
Open a second command prompt then enter your command. Mine is protractor conf.js
Probably a bit late but I get this error when I fail to start server for web-driver using:
webdriver-manager start
Update the chrome driver using the command =>
webdriver-manager update --versions.chrome <73.0.3683.68>
after upgrading just install node modules once again using cmd => npm install

How to fix RequestError: Error: connect ETIMEDOUT while running Mocha JS/NodeJS test from behind proxy

I am getting the below error while trying to run Mocha JS test case which runs npm request-promise to call a REST service. I was able to connect to the REST URI endpoint through ARC client bur it failed with below error while running through organization's proxy-
RequestError: Error: connect ETIMEDOUT SERVER_IP:SERVER_PORT
at new RequestError (<Some_Path>\errors.js:14:15)
at Request.plumbing.callback (<Some_Path>\plumbing.js:87:29)
at Request.RP$callback [as _callback] (<Some_Path>\plumbing.js:46:31)
at self.callback (<Some_Path>\request.js:188:22)
at Request.onRequestError (<Some_Path>\request\request.js:884:8)
at TLSSocket.socketErrorListener (_http_client.js:309:9)
at emitErrorNT (net.js:1277:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
I fixed this issue with adding the following in the request-promise options-
proxy:'http://PROXY_SERVER_IP:PORT#'
I hope this helps.
Cheers,
Kunal
This worked for me
var request = require('request-promise').defaults({
proxy:'http://username:password#host:port',
strictSSL :false
});

My meanjs Application is not getting started in offline mode?

I have installed all the prerequisites for a mean application(MEAN) as described in Meanjs Official website
I want you to look at this particular error I am getting and that too when I am offline.
But it does work well when I am connected to internet.
Help me Try looking at the error below:
Could not connect to MongoDB!
Error: failed to connect to [localhost:27017]
C:\Users\ASHOK\Downloads\meanjs-mean-88a89f2\node_modules\connect-mongo\lib\connect-mongo.js:186
throw err;
^
Error: Error connecting to database: failed to connect to [localhost:27017]
at null.<anonymous> (C:\Users\ASHOK\Downloads\meanjs-mean-88a89f2\node_modules\mongoose\node_modules\mongodb\lib\mongodb\connection\server.js:555
:25)
at emit (events.js:118:17)
at null.<anonymous> (C:\Users\ASHOK\Downloads\meanjs-mean-88a89f2\node_modules\mongoose\node_modules\mongodb\lib\mongodb\connection\connection_po
ol.js:156:15)
at emit (events.js:110:17)
at Socket.<anonymous> (C:\Users\ASHOK\Downloads\meanjs-mean-88a89f2\node_modules\mongoose\node_modules\mongodb\lib\mongodb\connection\connection.
js:534:10)
at Socket.emit (events.js:107:17)
at net.js:950:16
at process._tickCallback (node.js:355:11)
[nodemon] app crashed - waiting for file changes before starting...
Did you start mongodb: try typing mongod into the terminal

Connection refused while connection elasticsearch in node

I am using node version 0.10.33 and elasticsearch version 3.0.0 but i am not able to connect to elasticsearch.
http://localhost:9200/
Elasticsearch ERROR: 2014-11-25T16:30:16Z
Error: Request error, retrying -- connect ECONNREFUSED
at Log.error (/Users/shank/Documents/MyUmpa/Server/node_modules/elasticsearch/src/lib/log.js:213:60)
at checkRespForFailure (/Users/shank/Documents/MyUmpa/Server/node_modules/elasticsearch/src/lib/transport.js:195:18)
at HttpConnector.<anonymous> (/Users/shank/Documents/MyUmpa/Server/node_modules/elasticsearch/src/lib/connectors/http.js:146:7)
at ClientRequest.bound (/Users/shank/Documents/MyUmpa/Server/node_modules/elasticsearch/node_modules/lodash-node/modern/internals/baseBind.js:56:17)
at ClientRequest.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1551:9)
at Socket.emit (events.js:95:17)
at net.js:440:14
at process._tickCallback (node.js:419:13)
Trace: elasticsearch cluster is down!
at app.post.resturantController.ResturantInfo.name (/Users/shank/Documents/MyUmpa/Server/app.js:32:13)
at respond (/Users/shank/Documents/MyUmpa/Server/node_modules/elasticsearch/src/lib/transport.js:254:9)
at sendReqWithConnection (/Users/shank/Documents/MyUmpa/Server/node_modules/elasticsearch/src/lib/transport.js:174:7)
at next (/Users/shank/Documents/MyUmpa/Server/node_modules/elasticsearch/src/lib/connection_pool.js:213:7)
at process._tickCallback (node.js:419:13)
Have you run elastic search server? If not then Download Elasticsearch and unzip it into whatever directory you like. Next, open a terminal, cd to the directory you just unzipped, and run bin/elasticsearch (bin/elasticsearch.bat on Windows). After running elasticsearch server, run the node server!

Resources