I am working on an AngularJS app, and want to get Protractor up and running with it, to use for testing the front end user interaction automatically.
The way my development environment is set up, is that I am doing the front-end development on my local Windows desktop, and running grunt on a CentOS 7 VM to serve the front-end of the application.
I have used Unix systems a bit in the past, but predominantly just for a couple of modules I took at university a few years ago, so don't have that much experience with them.
When I joined this company, I started working with the practises that they already had in place. Day-to-day, my use of the Unix VM is simply:
- Start it up
- Open a couple of terminals
- Become root (
- Run python (
python3.4 -m myApp start)
grunt servefrom the appropriate location, to serve the front end
I am following the tutorial at: http://www.protractortest.org/#/tutorial to try and get Protractor up and running to use it as a testing framework within my development environment, and have done the first couple of steps of the setup without any problems:
npm install -g protractor
When I then try to run the next command:
webdriver-manager start, I get an error that says:
'java' is not recognized as an internal or external command, operable program or batch file.
[11:24:04] I/start - Selenium Standalone has exited with code 1
I assume that this means that Java is not installed on the VM, and will need to be in order to run the command
I downloaded the JRE for linux x64 (.rpm file) from Oracle, and copied it to the desktop of my VM. I am now following the instructions at Linux Java installation to install Java on the VM, but am having a bit of trouble doing so...
I have followed the steps:
- Become root
- Change to the directory in which you want to install
- Install the package: `rpm -ivh jre-8u144-linux-x64.rpm
but when I run this last command, to install the package, the console shows an error that says:
open of jre-8u144-linux-x64.rpm failed: No such file or directory
If I run
ls from the terminal where I am logged in as
root, I can't see any of the files on the Desktop (which is my current location), but if I run
ls from another terminal where I'm not logged in as
root, I can see all of the files on the desktop, including the jre-8u144-linux-x64.rpm file that I'm trying to install...
So why is it that the
root user can't see the .rpm file that I want to install, even though the 'normal' user can...? I tried installing the JRE from the 'normal' user by running the command in that terminal, but obviously got an error stating that I didn't have the permissions to do this:
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)
How can I install the JRE that I need in order to use this testing framework on my VM?