Closed harimadusumilli closed 4 years ago
@harimadusumilli I am very sorry for the inconvenience caused. We do not host the nightlies in bintray anymore. However, you can build the offline js runner from source and try using it in your machine. You will need internet to build from source, so please make sure you build it in a machine with internet connectivity. You can refer here to build the offline runner.
We will also do a gauge-js release soon, so that the offline binary is available for download.
Hello Neha,
Thank you for your response. Is there any tentative time frame when the offline binary will be available ?
My Node version is as below:
C:\Travellers-Learn\Javascript_plugin\gauge-js-2.3.4>node -v v10.15.0
I tried using the documentation as suggested by you above and here is what I did. 1) I obtained the gauge-js-2.3.4. 2) unzipped it 3) changed it to the directory where the package.json file is and opened the command prompt. 4) typed npm install and hit enter at the command prompt.
I got the following output with errors:
C:\Travellers-Learn\Javascript_plugin\gauge-js-2.3.4>npm install
grpc@1.18.0 install C:\Travellers-Learn\Javascript_plugin\gauge-js-2.3.4\node_modules\grpc node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for grpc@1.18.0 and node@10.15.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error socket hang up
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\hadusumi\AppData\Local\Programs\Python\Python37\python.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.18.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\hadusumi\AppData\Roaming\npm-cache_logs\2019-10-21T14_37_39_718Z-debug.log
If you see below, I already have Python installed on my machine with the version below:
C:\Travellers-Learn\Javascript_plugin\gauge-js-2.3.4>py --version Python 3.7.4
Please let me know if you any suggestions or recommendations or if you think this is incorrect, can you please guide me or let me know what needs to be done in order to get this installed successfully.
I am able to use taiko , but would like to use it with the Gauge-JS script plugin. Help is appreciated.
Thanks, Hari
I tried using the documentation as suggested by you above and here is what I did.
Where did you find this documentation? The steps you followed seems to be incorrect. I would like to fix the documentation.
1) I obtained the gauge-js-2.3.4. 2) unzipped it
Where did you find this zip file?
3) changed it to the directory where the package.json file is and opened the command prompt.
I don't understand what you are trying to do here.
@harimadusumilli You need to build the offline runner from source right now.
npm install
and npm run offlinePackage
to build the offline zip installer. gauge install js --file gauge-js-<version>-offline.zip
command.Thank you Neha for your response. The above steps 1 and 2 was something I thought should have been done. Thank you for correcting me. I believe, I have misunderstood the documentation.
Cheers!! Hari
Hi Neha,
If you want me to open another issue, I can do it. But, this is what is happening on my side at this time. I was able to create the offline js zip file package following your instructions. I tried installing it and I am running into the following issues:
C:\Travellers-Learn\Gauge_Taiko>gauge -v Gauge version: 1.0.4 Commit Hash: 3a9a647
csharp (0.10.5) dotnet (0.1.2.nightly-2019-02-14) html-report (4.0.7) java (0.6.9) js (2.3.6) screenshot (0.0.1)
C:\Travellers-Learn\Gauge_Taiko>gauge init js Compatible language plugin js is not installed. Installing plugin... Failed to install plugin 'js'. Reason: Invalid plugin. Could not download js-install.json file. Failed to install plugin 'js'. Reason: Invalid plugin. Could not download js-install.json file.
Is there anything else that I should be doing or have I done something that is incorrect ?
Help is appreciated.
@harimadusumilli Is there any reason you are using an older version of gauge? The JS plugin 2.3.6 does not work with Gauge version 1.0.4. If you update Gauge to the latest release 1.0.6, it should work fine.
Thank you for your help once again, I believe I am progressing forward little by little. Please bear with me. Here is where I am right now after doing the following:
Upgraded to the Gauge version 1.0.6
Installed the Gauge JavaScript Plugin as below: C:\Tools>gauge install js --file gauge-js-offline-2.3.6.zip audited 704 packages in 3.025s found 0 vulnerabilities Successfully installed plugin 'js' version 2.3.6
Created the Gauge JavaScript Plugin based project Successfully as below:
C:\Travellers-Learn\Gauge_Taiko>gauge init js Initialising Gauge JavaScript project create manifest.json create specs create specs\example.spec create .gitignore create env create env\default create env\default\default.properties Successfully initialized the project. Run specifications with "gauge run specs/".
C:\Travellers-Learn\Gauge_Taiko>gauge run specs C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\node_modules\protobufjs\src\root.js:94 throw err; ^
Error: ENOENT: no such file or directory, open 'C:/Users/hadusumi/AppData/Roaming/gauge/plugins/js/2.3.6/gauge-proto/lsp.proto'
at Object.openSync (fs.js:439:3)
at Object.readFileSync (fs.js:344:35)
at fetch (C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\node_modules\protobufjs\src\root.js:160:34)
at Root.load (C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\node_modules\protobufjs\src\root.js:194:13)
at Root.loadSync (C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\node_modules\protobufjs\src\root.js:235:17)
at Object.loadSync (C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\node_modules\@grpc\proto-loader\build\src\index.js:230:27)
at Object.
[Gauge] Failed to start gauge API: Timed out connecting to 127.0.0.1:54237
Get Support ---------------------------- Docs: https://docs.gauge.org Bugs: https://github.com/getgauge/gauge/issues Chat: https://gitter.im/getgauge/chat
Your Environment Information ----------- windows, 1.0.6, 2bc49db csharp (0.10.5), dotnet (0.1.2), html-report (4.0.7), java (0.6.9), js (2.3.6), screenshot (0.0.1)
Please let me know how to resolve this.
Thank you once again for your fantastic help you have offered me till date.
Hello Gauge Support,
I am following up to know if you have had a chance to look at this issue of mine. Please let me know either ways.
Thanks, Hari
@harimadusumilli How did you download the gauge-js repository? Did you use git? If so, can you please go to the gauge-js repository and run the following commands?
git submodule init
git submodule update
try installing the offline installer again and try the same steps you ran above. Let me know if this helps.
Hello Neha,
Yes, we use Git and I cloned the repository and performed the above commands you have suggested.
After doing that I then did the following :
I then copied the offline installer to a different folder on my machine and ran the following command
If you see below the Js package is installed successfully.
C:\Travellers-Learn\Gague_updated_Install>gauge -v Gauge version: 1.0.6 Commit Hash: 2bc49db
csharp (0.10.5) dotnet (0.1.2.nightly-2019-02-14) html-report (4.0.7) java (0.6.9) js (2.3.6) screenshot (0.0.1) xml-report (0.2.1)
Now when I try to run the following:
C:\Travellers-Learn\Gague_updated_Install>gauge init js Compatible language plugin js is not installed. Installing plugin... Failed to install plugin 'js'. Reason: Invalid plugin. Could not download js-install.json file.
Previously the gauge init js created the project for me and now I am getting the above error.
Is there any other tip you can suggest that I can do.
as I very badly want to make Taiko work with the JavaScript plugin in our organization as I want to make it the goto tool for UI Automation Testing. I have enjoyed using Gauge with DotNetCore and have been able to establish it within our organization.
Thanks, Hari
This is additional information, I am assuming its missing this folder : C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6
The above folder 2.3.6 does not have any file(s) in it.
@harimadusumilli There must have been something wrong when the offline installer was built. It clearly hasn't installed properly. Just to see where the problem is, can you please copy the contents of the zip file into the 2.3.6 folder? (you need to just copy over the contents inside the zip and not the entire folder). This may work, if this is the issue, let me try to debug and see where the problems is.
List of files you should have inside the 2.3.6 folder:
README.md index.bat node_modules skel
debug.bat index.js package-lock.json src
gauge-proto js.json package.json
Thank you Neha, the above suggestion of yours seemed to have worked. I was able to run the example.spec that Gauge by default creates 👍 . I tried using Taiko with Gauge and I am now running into the following error. I have installed Taiko successfully as I am able to use the command Taiko and create the .js scripts from the REPL.
The below is my spec file:
This is an executable specification file. This file follows markdown syntax. Every heading in this file denotes a scenario. Every bulleted point denotes a step.
To execute this specification, run
gauge specs
Implementation file is as below: "use strict"; var assert = require("assert"); const {openBrowser,goto,closeBrowser} = require('taiko');
// Insert step text below as first parameter
step("Launch Travelers Website with the following url
step("Key in zipcode
When I run the Gauge command from the command line as below: gauge run specs\maintravelers.spec --verbose
I get the error that its not able to find Taiko and the errors are as given below: Total time taken: 88ms PS C:\Travellers-Learn\Gauge_Taiko> gauge run specs\maintravelers.spec --verbose Unable to require module 'taiko' in C:\Travellers-Learn\Gauge_Taiko\tests\maintravelers_implementation.js Error: Cannot find module 'taiko' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\src\req-manager.js:36:18 at Req.load (C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\src\req-manager.js:47:5) at fn (C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\src\req-manager.js:58:20) at C:\Travellers-Learn\Gauge_Taiko\tests\maintravelers_implementation.js:3:41 at Script.runInContext (vm.js:107:20) at Object.runInContext (vm.js:285:6) at VM.run (C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\src\vm.js:59:8) Error executing tests\maintravelers_implementation.js C:\Travellers-Learn\Gauge_Taiko\tests\maintravelers_implementation.js:3 const {openBrowser,goto,closeBrowser} = require('taiko'); ^
TypeError: Cannot destructure property openBrowser
of 'undefined' or 'null'.
at C:\Travellers-Learn\Gauge_Taiko\tests\maintravelers_implementation.js:3:41
at Script.runInContext (vm.js:107:20)
at Object.runInContext (vm.js:285:6)
at VM.run (C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\src\vm.js:59:8)
at VM.runFile (C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\src\vm.js:73:8)
at C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\src\impl-loader.js:13:10
at Array.forEach (
TypeError: Cannot destructure property openBrowser
of 'undefined' or 'null'.
at C:\Travellers-Learn\Gauge_Taiko\tests\maintravelers_implementation.js:3:41
at Script.runInContext (vm.js:107:20)
at Object.runInContext (vm.js:285:6)
at VM.run (C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\src\vm.js:59:8)
at VM.runFile (C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\src\vm.js:73:8)
at C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\src\impl-loader.js:13:10
at Array.forEach (
* Launch Travelers Website with the following url "https://www.travelers.com/index"
C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\src\executor.js:50 new Test(step.fn, parameters, timeout).run().then( ^
TypeError: Cannot read property 'fn' of undefined
at Object.executeStep [as step] (C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\src\executor.js:50:17)
at MessageProcessor.executeStep (C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\src\message-processor.js:50:26)
at MessageProcessor.getResponseFor (C:\Users\hadusumi\AppData\Roaming\gauge\plugins\js\2.3.6\src\message-processor.js:346:40)
at ExecutionConnection.
[Gauge] Connection to runner with Pid 19656 lost. The runner probably quit unexpectedly. Inspect logs for potential reasons. Error : read tcp 127.0.0.1:51034->127.0.0.1:51035: use of closed network connection
Get Support ---------------------------- Docs: https://docs.gauge.org Bugs: https://github.com/getgauge/gauge/issues Chat: https://gitter.im/getgauge/chat
Your Environment Information ----------- windows, 1.0.6, 2bc49db csharp (0.10.5), dotnet (0.1.2), html-report (4.0.7), java (0.6.9), js (2.3.6), screenshot (0.0.1), xml-report (0.2.1)
Taiko version installed : C:\Travellers-Learn\Gague_updated_Install>taiko -v Version: 1.0.2 (Chromium: 76.0.3803.0) RELEASE
Hello Gauge Support,
In addition to the above, I have also done this. I have installed taiko in my project folder using the following command npm install --save-dev taiko. It did get installed and when I tried to run using the gauge run specs, I am getting the following error message.
Failed Step: Open Travelers website
Specification: specs\testsample.spec:7
Error Message: Error: Timed out
Stacktrace:
Error: Timed out
at Timeout.
@harimadusumilli Try with increasing the test_timeout
in Gauge properties file.
You can find this property under the env/default/js.properties
.
Hello Shumbham,
Thank you for the suggestion, I increased the time out from 1000 to 3000. I would imagine that this is in milliseconds. The Tests run without any errors. The other question I have is does it by default run in headless mode ? If it has to run in a headful mode ? Is there any setting that I need to do in the Javascript file(s) implementation files.
Thank you all for the fantastic support and help you have been providing all along the way till now.
Hari
For options to run in headful mode and other options you can refer. https://taiko.gauge.org/#openbrowser
Zabil, Thank you very much.. It works and I am right now in Tears with happiness. Do you guys do any working videos of how you use this framework. If not, I would like to know if I can do some videos and post them on Udemy for free, so that other people can benefit from this.
Thanks, Hari
That's good news :) We have a few basic demo videos. But it will be great if you can make videos about your experience of Gauge and Taiko. Please feel free to reach out to us on our http://gitter.im/getgauge/chat for any help or discuss this.
When I click the Zipped file link to download Java script plugin which has been provided for offline installation. The plugin does not download completely. I am able to download the other plugins. The offline plugin specifically provided does not download completely. Attached screen shot