Has anyone managed to get Botium working with Cucumber for Java? - selenium-webdriver

I've tried my best to get Botium to work with BDD so I can see if its useful but the only BDD example I've come across is this https://github.com/codeforequity-at/botium-bdd-samples/
But I'm unable to install the dependencies with NPM install so I was wondering if its possible to get Botium to work with cucumber for java on intellij?
I've tried to install botium with the js example but I continue to get errors with NPM
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=C:\\Users\\sahmed248\\IdeaProjects\\botium-bdd-samples\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\sahmed248\\IdeaProjects\\botium-bdd-samples\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown"
gyp ERR! cwd C:\Users\sahmed248\IdeaProjects\botium-bdd-samples\node_modules\grpc
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\Users\sahmed248\IdeaProjects\botium-bdd-samples\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\sahmed248\IdeaProjects\botium-bdd-samples\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\sahmed248\IdeaProjects\botium-bdd-samples\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Windows_NT 10.0.16299
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\sahmed248\\IdeaProjects\\botium-bdd-samples\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd C:\Users\sahmed248\IdeaProjects\botium-bdd-samples\node_modules\grpc
node-pre-gyp ERR! node -v v10.15.3
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
If anyone is able to either help me solve the issue with NPM or explain how to use Botium with cucumber for Java that would be helpful.

Botium Core is a Node.js library, so using it with Java is tricky, but not impossible: Botium supports a special "Grid mode", where it runs in the background and exposes a HTTP/JSON interface - see here for more info.
For your installation problem, here some hints what you can try - obviously the node-gyp package fails:
* remove the node_modules folder and the package-lock.json file and run npm install again
* run "npm install -g node-gyp" with admin privileges
* run "npm install -g windows-build-tools" with admin privileges
(see https://github.com/nodejs/node-gyp)

Related

npm install #storybook/aem --save-dev library error while installing

I am trying to install 'npm install #storybook/aem --save-dev' in my AEM project created from archtype23 under ui.frontendfolder but every time when I execute the following command getting the following error. Please help.
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack at findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16)
gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack at findVisualStudio2015 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14)
gyp ERR! stack at regSearchKeys (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16)
gyp ERR! stack at regGetValue (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack at ChildProcess.exithandler (child_process.js:301:5)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Kaushik\AEMPersonal\ADOBE-EXPERIENCE-MANAGER6.3-Initials\myproject\ui.frontend\node_modules\node-expat
gyp ERR! node -v v10.21.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-expat#2.3.18 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat#2.3.18 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Please guide what can I do next.
Kind Regards,
Kaushik
The above issue got fixed by installing visual studio using visual studio installer.

Unable to create React typescript project

Hi I always get the following error while creating typescript based react project, and the project gets created with .js files instead.
I have tried to reinstall the create-react-app utility but did not work.
> node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v57-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents#1.0.17 and node#8.6.0 (node-v57 ABI) (falling back to source compile with node-gyp) > gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 18.0.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/mpant/my-app/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/mpant/my-app/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64"
gyp ERR! cwd /Users/mpant/my-app/node_modules/fsevents
gyp ERR! node -v v8.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/mpant/my-app/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node --module_name=fse --module_path=/Users/mpant/my-app/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/mpant/my-app/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:927:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Darwin 18.0.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/mpant/my-app/node_modules/fsevents/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/mpant/my-app/node_modules/fsevents
node-pre-gyp ERR! node -v v8.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
Try updating your local create-react-app version to >=2.1
npm update -g create-react-app
Then create your react app with typescript using below command.
create-react-app my-app --typescript
Note : using npx has a conflict with the global version of installed create-react-app. You can also try clearing your npm cache.

Canvas/ChartJs dependency on Cairo

Why is there a dependency of installing Cairo for using Canvas/ChartJS? I am using OSX / Mac. I am running into issues which installing this project for Charts. I have seen some stackoverflow threads where the resolution is to install the system level libraries of Cairo.
https://github.com/jerairrest/react-chartjs-2
> canvas#1.6.7 install /Users/rjain/code/react-chartjs-2/node_modules/canvas
> node-gyp rebuild
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
gyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/rjain/.config/fnm/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 17.0.0
gyp ERR! command "/Users/rjain/.config/fnm/bin/node" "/Users/rjain/.config/fnm/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/rjain/code/react-chartjs-2/node_modules/canvas
gyp ERR! node -v v8.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN react-chartjs-2#2.6.4 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! canvas#1.6.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas#1.6.7 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! /Users/rjain/.npm/_logs/2017-10-11T21_53_41_819Z-debug.log

Angular-cli failed to install properly

I wonder if you can help me.
I tried to install the angular-cli by the npm command
npm install -g angular-cli, however I got a lot of messages, and 'ng' command does not work.
Some of the errors I got are as following
> node-zopfli#1.4.0 install C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-zopfli
node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download: https://node-zopfli.s3.amazonaws.com/Release/zopfli-v1.4.0-node-v48-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for node-zopfli#1.4.0 and node#6.5.0 (node-v48 ABI) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-gyp\lib\configure.js:449:14)
gyp ERR! stack at C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-gyp\lib\configure.js:404:11
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-zopfli\lib\binding\node-v48-win32-x64\zopfli.node" "--module_name=zopfli" "--module_path=C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-zopfli\lib\binding\node-v48-win32-x64"
gyp ERR! cwd C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-zopfli
gyp ERR! node -v v6.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-zopfli\lib\binding\node-v48-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-zopfli\lib\binding\node-v48-win32-x64' (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Windows_NT 10.0.14393
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-zopfli
node-pre-gyp ERR! node -v v6.5.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-zopfli\lib\binding\node-v48-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-zopfli\lib\binding\node-v48-win32-x64' (1)
npm WARN install:node-zopfli#1.4.0 node-zopfli#1.4.0 install: node-pre-gyp install --fallback-to-build
npm WARN install:node-zopfli#1.4.0 Exit status 1
node-sass#3.10.0 install C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-sass
node scripts/install.js
Start downloading binary at https://github.com/sass/node-sass/releases/download/v3.10.0/win32-x64-48_binding.node
Binary downloaded and installed at C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-sass\vendor\win32-x64-48\binding.node
node-sass#3.10.0 postinstall C:\Users\my name\AppData\Roaming\npm\node_modules\angular-cli\node_modules\node-sass
node scripts/build.js
Do I need to install anything other then node.js?
Im quite new to Angular, trying to do some tutorials and experiments
Thanks for your help and time
set environment variable PYTHON, with value of full path where python.exe is installed.
If its C:\Program Files\Python34\ then value will be C:\Program Files\Python34\python.exe
I am not on Windows but what you should consider doing first, run command line with administrative privileges. select the application on secondary menu (right click) select runs as admin.
Before that make sure you have installed the latest version of node.js. and the run the following commands.
npm uninstall -g angular/cli
npm cache clean
npm install -g angular/cli#latest
An update on this. I installed the new node.js V6.6.0, uninstalled the Angular-Cli, cleaned cache and re-installed the clie and it seems to have done the trick since I was able to install the Angular-CLI without problems this time, and ng new is working.

I was trying to run sb-admin-bs4-angular2-master which is an nodejs app and getting the following error when i run npm install

enter image description here
first i run npm install -g ts-node
then i run npm install which gives me following error...no idea what to do..
when i run it by npm start ... it gives me more errors of gulp server or something
C:\Users\Raheel\Downloads\SB-Admin-BS4-Angular-2-master\SB-Admin-BS4-Angular-2-master\node_modules\c3\node_modules\d3\node_modules\jsdom\node_modules\contextify>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Python executable "C:\Users\Raheel\AppData\Local\Programs\Python\Python35-32\python.EXE" is v3.5.1, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at failPythonVersion (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:406:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:395:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:204:7)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at maybeClose (internal/child_process.js:827:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Raheel\Downloads\SB-Admin-BS4-Angular-2-master\SB-Admin-BS4-Angular-2-master\node_modules\c3\node_modules\d3\node_modules\jsdom\node_modules\contextify
gyp ERR! node -v v4.4.3
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE
npm ERR! contextify#0.1.15 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify#0.1.15 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs contextify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Raheel\Downloads\SB-Admin-BS4-Angular-2-master\SB-Admin-BS4-Angular-2-master\npm-debug.log
C:\Users\Raheel\Downloads\SB-Admin-BS4-Angular-2-master\SB-Admin-BS4-Angular-2-m
aster>
In the first lines you can read :
Error: Python executable "C:\Users\Raheel\AppData\Local\Programs\Python\Python35-32\python.EXE" is v3.5.1, which is not supported by gyp.
Check that you have python 2.5 installed, seems like npm can't use python 3.x
If I'm not wrong, you need a python version which is 2.5 or higher but lower than 3.0.
Check npm doc for more.

Resources