nssm + Selenium Server 3 + Windows 10: Behat tests are not launching Chrome - windows

I successfully installed nssm with the command: PS C:\Users\MyUser> nssm install selenium-server java -jar "C:\selenium\selenium-server-standalone-3.141.59.jar
Then I try to proceed to run my Behat tests, the tests appear to be running when I see the steps pass in the command line. Strangely, I do not see Chrome open up as the test progresses.
If I run selenium-server manually (without nssm), then I can see Chrome running the test fine.

Related

Cypress --headless still opening browser window on mac os

npx npm run cypress --headless running this code in my project is still opening up a google chrome user, requiring UI to keep it going
no matter what I try, even uninstalling and reinstalling cypress doesn't fix the issue
The correct way is:
cypress run
Actually by default this command is executed in headless mode, that's why it's not necessary to write --headless. And if you want to run it in headed mode, then:
cypress run --headed

Proxy error while installing Cypress on citrix machine

I am trying to install cypress on my Citrix machine using command npm install --save-dev cypress (It was working fine earlier) but now getting this error-
also, the same is working fine on my Local, But there is no proxy connection I am using to access internet in my citrix machine, not sure why suddenly it is throwing proxy error, I am not able to proceed further.
Follow the steps mentioned in the below for reference -
Pre-Requisites (Node JS & Package.json Creation -
Download VS Code latest one
Download Node from Node.js site to install
Once installed add New System Variable under windows Environment Variables as "Variable name" as NODE_HOME and "Variable value as C:\Program Files\nodejs
Go to the Project Folder and open in Command Prompt as below -
Then run command npm init
Enter Name as below as highlighted in yellow as cypressautomation -
Press Enter till below -
Then type yes Package.json file should get created
Restart Visual Studio Code
Clean Install of Cypress from Scratch - 1. Clear Cypress by searching in windows and Shift Delete(Excluding the project folders)
2. Download Cypress from https://download.cypress.io/desktop/9.5.2 (Pass any version based from - https://docs.cypress.io/guides/references/changelog
3.Use this command in VS Code terminal as setx CYPRESS_INSTALL_BINARY rojectfolder.zip (Copy this zip file to any location and mention the path after CYPRESS_INSTALL_BINARY)
4. Restart Visual Studio Code d. Run from terminal - npm install cypress#10.3.0 (This will install node_modules & package. lock.json)
5. \node_modules.bin\cypress.cmd install -- force
6. add the below command under scripts in package.json -
Cypress :run": "set Cypress RUN BINARY.C://Users//%username%// AppData//Local//Cypress//Cache//9.5.2//Cypress//Cypress.exe&& cypress open --browser electron (set CYPRESS_RUN_BINARY=mention the Appdata Path for cypress.exe)
We can figure out this issue using two steps.
step 1. Download cypress.zip file using URL that error has mentioned.
step 2 : run this command set CYPRESS_INSTALL_BINARY=yourPath\cypress.zip && npm install cypress

Unable to install or run Octave in a Windows docker container

I'm trying to create a Windows docker container image with Octave (CLI) installed.
I started off with a Dockerfile installing Octave via chocolatey:
FROM mcr.microsoft.com/windows/servercore:1809
# Install chocolatey
RUN ["powershell", "Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"]
# Install Octave
RUN ["powershell", "choco install --yes octave"]
Unfortunately the Octave install times out after 2700 seconds, while on my local machine this takes less than 10 minutes.
Progress: 100% - Completed download of C:\Users\ContainerAdministrator\AppData\Local\Temp\chocolatey\octave.install\5.1.0\octave-5.1.0-w64-installer.exe (286.41 MB).
Download of octave-5.1.0-w64-installer.exe (286.41 MB) completed.
Hashes match.
Installing octave.install...
Chocolatey timed out waiting for the command to finish. The timeout
specified (or the default value) was '2700' seconds. Perhaps try a
higher `--execution-timeout`? See `choco -h` for details.
The install of octave.install was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\octave.install\tools\chocolateyinstall.ps1'.
See log for details.
In my second trial I ran a Windows servercore container, copied the Octave installer binary into there and tried to run it, however the start call unfortunately immediately returns with error code -1073741515.
My third trial was downloading the portable Octave version and copy it into a running Windows servercore container, copy the portable Octave and run it. Unfortunately when calling octave-cli.exe the call again returns immediately with error code -1073741515.
I then checked with dependency walker, on my local machine, which dependencies the octave-cli has, it seemed to depend on adoptopenjdk\jdk-14.0.1.7. In my last trial I installed this dependency in the Windows servercore container via choco install adoptopenjdk, this however resulted in the same error code.
I'm curious whether anybody did succeed in installing or running Octave into a Windows docker container?
Or does anyone have any hints for me to proceed?

Unable to install qunit using npm

I was trying to install "qunit" using Windows command Prompt by executing the command
"npm i qunit".
On executing , it loads something and then it does not show anything . I have to press Ctrl+C twice to stop whatever this command is executing in the background.
Because of this "qunit" is not getting installed properly.
How should i resolve this problem ?

unable to connect to chromedriver http://127.0.0.1:50299 (Selenium::WebDriver::Error::WebDriverError) [duplicate]

I get this error when I run my cucumber tests:
"*Unable to either launch or connect to Chrome. Please check that ChromeDriver is up-to-date. Using Chrome binary at: /opt/google/chrome/google-chrome (Selenium::WebDriver::Error::UnknownError)
*"
I downloaded the chromdriver, unzip it, copy it to the path (/opt/google/chrome/google-chrome ) and sudo chmod +x /opt/google/chrome/google-chrome.
which google-chrome : /usr/bin/google-chrome
which chromedriver : /usr/share/ruby-rvm/gems/ruby-1.9.2-p318/bin/chromedriver
capybara (1.1.2)
cucumber (0.9.4)
cucumber-rails (0.3.2)
selenium-webdriver (2.20.0)
I searched my error but none of the answers worked for me!
When I run my test I do not see chrome starts!
I really dont know what is wrong! I tried two different versions of chromedriver!
Jenkins should run/executes my tests in CI.The tests work when you run them but not when Jenkins runs them? I could run them by another user and then I installed jenkins and I get this error. I get the same error when I run my tests in terminal at terminal as well.Did you read https://wiki.jenkins-ci.org/display/JENKINS/My+software+builds+on+my+computer+but+not+on+Jenkins ? I couldnt find much about my problem here. xvfb: I installed the plugin in the jenkins but in the build environment if I click "run xvfb before the build and shut it down after", I get this error: "FATAL: null java.lang.NullPointerException"
Please provide more details. How does this question relate to Jenkins? Is Jenkins executing the tests? The tests work when you run them but not when Jenkins runs them? You do not go so far as to say that out loud, but I will assume it because it is what people usually need help with.
Did you read https://wiki.jenkins-ci.org/display/JENKINS/My+software+builds+on+my+computer+but+not+on+Jenkins ?
If you are executing Chrome inside a Jenkins job, do you have something like https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin or https://wiki.jenkins-ci.org/display/JENKINS/Xvnc+Plugin installed?
chromedriver can be installed in two ways: downloading, decompressing the zip and putting the file in "/usr/bin" or adding the "chromedriver-helper" gem in your Gemfile.
Choose one or another way because doing both many time it causes problems. If you are installing chromedriver from google, be sure to uninstall the gem:
gem uninstall chromedriver-helper
and be sure chromedriver is in your path:
which chromedriver
Give this a try instead => https://github.com/flavorjones/chromedriver-helper
Finally I found the answer:
if you want to run GUI tests on Jenkins CI running on Windows do not
configure it as a windows service instead run it from the command
prompt or set it up as a scheduled task to run on windows logon using
the command “java -jar jenkins.war”
taken from this article

Resources