-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Karate Robot Windows Install Guide
To make this a comprehensive guide, this will take you through the process of installing Karate Robot on a freshly provisioned Windows box from AWS.
The main pre-requisites are
- a 64-bit Windows OS
- a 64-bit Java Runtime
- the Karate binaries
- karate.jar
- karate-robot.jar
- Visual Studio Code
- with the Karate Runner plugin
- Tesseract Data Files (optional)
It has to be 64-bit. After we created one on AWS, we installed FireFox because the stock Internet Explorer makes it hard to download files.
Before you do this, check if you already have Java installed by opening a cmd terminal and typing:
java -version
If it responds with a version that is 1.8.0_112 or greater (Java version 8) you are all set !
note that Java 13 and greater is not yet supported.
Here, clearly Java is not present:
So to get Java, go to https://www.java.com/download in a browser and you should see something like this. Java 8 is preferred, and you can download what is being shown here.
One the Java installer EXE is downloaded, run it and go through the install process.
Once done, open a fresh cmd terminal Window and make sure that Java is installed.
Download the Karate ZIP Release and extract it to a folder of your choice.
currently 0.9.6.RC3 is available
To test that Karate is working fine you can type this command by opening a cmd terminal in the "root" of the Karate folder:
karate -h
This means that Java and Karate are installed correctly.
Note that karate.jar is already present and it came along with the ZIP Release. For the Windows Desktop Automation we need one more binary. Download karate-robot.jar from the locations provided here. The file will be suffixed with the version number.
currently 0.9.6.RC3 is available
After downloading the file, rename it to karate-robot.jar for convenience, and place it alongside karate.jar. There is one more thing we need to do which is edit karate.bat to "include" the new file we just added. Here below you can see what the folder and the edit should look like.
java -cp karate.jar;karate-robot.jar;. com.intuit.karate.Main %*
After this, you should be able to run Karate tests that operate Windows desktop applications. You can try this command:
karate src/demo/robot/calc.feature
Or if it is the "old" version of the Windows Calculator, use this:
karate src/demo/robot/calc-old.feature
