Saturday, February 21, 2015

Sikuli : How to install and run Sikuli in windows 7

Sikuli is an automated testing tool where one can automate the workflow of the application by using image of an element of UI and searching the image with the help of image detection algorithm. I have already discussed about Sikuli in my previous post. Here I will explain on how Sikuli can be installed and run and what are the pre-requisites we need.

Requirement :

Sikuli can be installed at the following OS and platforms.

  • Windows Xp/7/8 both 32 bit and 64 bit
  • Mac OS 10.6+
  • Linux 32 bit or 64 bit

Pre-Requisite :

Java JRE 6 or JRE 7 preferably the latest version.

Step 1: Install the pre-Requisite

  • Download Java if it is not installed in the PC. Latest Java (JRE) can be downloaded from this link. Note that only JRE 6 or 7 supports Sikuli. Sikuli works well with Windows 7 32 bit OS.
  • After going to Java download page click on “Accept License Agreement” button.

image

  • After clicking License agreement button, it shows the Thank you message.
  • Now click on appropriate Java installer for the machine. In my case, I have selected on “Windows x86 Offline” for my Windows 7 32 bit machine.

image

  • After downloading, double click on the installer “jre-7-windows-i586.exe”.
  • Click on Run button.

image

  • Click on Install button.

image

  • Installation will start.

image

  • Java runtime will be successfully installed. Click on Close button.

image

image

  • Sometimes a pop up can be appeared.
  • Click on Run button

image

  • A message shows that Java is installed properly.

Step 2 : Download Sikuli

Latest and stable version of Sikuli is 1.0.1. Version SikuliX 1.1.0 is final under development.

image

image

  • Sometimes an alert message is shown as I am using chrome browser. click on “Keep” button.

image

  • Download will start.

image 

Step 3 :  Install Sikuli

  • After Finishing download go to the download folder and copy the installer file and paste to a location when you install the file. In my case file location “C:\Sikuli\”
  • Double click on the installer

image

  • An instruction dialog is displayed that instructs to go to the File location and run the file named “runSetup.cmd” and click on OK button.

image

  • Go to the installer file location : “C:\Sikuli\”. Following files are displayed.

image

  • Double click on the file “runSetup.cmd” to run.

image `

  • A  command prompt is displayed. After that a dialog box is displayed with the text “Please read Carefully before proceedings!!”. Click on Ok button.

image

  • SikuliX-Setup window is displayed.

image

  • There are six options displayed on this window.

Option 1 :

image

If you choose this option you will be able to use sikuli IDE (discuss on other posts) and run the Sikuli scripts through command line. Using Sikuli jars you can implement sikuli script with the help of Java or Java aware scripting language and gets supports from Eclipse or NetBeans IDE. Clicking rightmost “…” button will display a dialog showing the details of choosing this option. Click OK button will close this dialog.

 image  

Option 2 :

image

If you choose this option, you can only be able to run the script through command line. Clicking rightmost “…” button will display a dialog showing the details of choosing this option. Click OK button will close this dialog. If Option 1 is selected with this option then you need to run setup again only selecting this option. So the primary objective of this package to run Sikuli script on command line and no need Sikuli IDE.

image 

Option 3 :

image

If you want to develop and run script in Jython language using Eclipse IDE then  you can choose this option. Clicking rightmost “…” button will display a dialog showing the details of choosing this option. Click OK button will close this dialog. Note that you can choose Option 1 or 2 with this option.

image

Option 4 : 

image

If you want to develop sikuli script in Java or Jython using Eclipse/NetBeans or other IDE and you do not need option 1 or 2 you can use this option. Clicking rightmost “…” button will display a dialog showing the details of choosing this option. Click OK button will close this dialog.

image 

Option 5 :

image  

If you want to Tesseract based OCR features you can this option. It is recommended not to use this option if you are new to Sikuli or using Sikuli for the first time. Clicking rightmost “…” button will display a dialog showing the details of choosing this option. Click OK button will close this dialog.

image

Option 6 : 

image

To run the packages (containing Sikuli script) on all supported platforms (Windows, Mac and Linux), you can choose this option. Clicking rightmost “…” button will display a dialog showing the details of choosing this option. Click OK button will close this dialog.

image

  • In my case I have selected Option 1, 2 and 4. Click on Setup Now button.

image

  • A confirmation dialog is displayed to ask about downloading some of the packages. Click on Yes button.

image

  • Downloading starts…

image

  • Some yellow color status text is displayed during installation.

image

  • A status dialog is displayed after installation that it is installed successfully. Click OK button to close the dialog.

image

  • If you go back to the Sikuli installation folder (In my case “C:\Sikuli”), you see some additional files are added and a “libs” folder.

image 

Step 4 : Run Sikuli IDE

  • In Sikuli installation folder, double click on the file named “runIDE.cmd”.

image

  • Sikuli IDE is displayed and we can develop and run script using this IDE.

image

In our future posts, we will show how we can develop script in Sikuli IDE and run it.

Happy Scripting by capturing UI image using Sikuli….!!!

Tuesday, February 10, 2015

How to verify that Java is working properly on your Machine

Sometime we need to verify that our machine has proper Java version installed. In our previous post we have shown on how to install Java in your Windows machine. Here we will show how to verify that Java is working properly.

Step 1 : To verify that Java is working properly, go to the link : https://www.java.com/en/download/installed.jsp

Step 2 : Click on “Agree and Continue” button

image

Step 3 : Sometimes a pop up can be appeared.

Step 4 : Click on Run button

image

Step 5 : A message shows that Java has been installed properly.

image

OR

image

Thank you!!!

Monday, February 9, 2015

How to install Java Runtime Environment in windows machine

Step 1: Java (JRE) can be downloaded from this link.

Step 2: Click on “DOWNLOAD” button for JRE. 

image

Step 3: After going to Java download page click on “Accept License Agreement” button.

image

Step 4: After clicking License agreement button, it shows the Thank you message.

image

Step 5: Now click on appropriate Java installer for the machine. In my case, I have selected on “Windows x64” for my Windows 8 64-bit machine.

image

Step 6: Download Starts

image

Step 7: After downloading, double click on the installer “jre-8u45-windows-x64.exe”.

 image

Step 8: User account control window is displayed and click “Yes” button.

Step 9: Keep the destination folder as default. Click on Install button.

image

Step 10: Installation will start.

image

Exception : If you have old version Java is installed then a window named “Java Setup – Uninstall out-of-date versions” is displayed to uninstall your old version. click on Uninstall button to uninstall Java.

image

It starts uninstalling Java.

image

Click Next button.

image 

Step 11: Java runtime will be successfully installed. Click on Close button.

image

Step 12: To verify that Java is working properly, go to the link : https://www.java.com/en/download/installed.jsp

Step 13: Click on “Agree and Continue” button

image

Step 14: Sometimes a pop up can be appeared.

Step 15: Click on Run button

image

Step 16:  A message shows that Java is installed properly.

image

OR

image

Thank you!!!

Cypress: How to handle browser-based authentication pop up dialog in Cypress

Five years ago I have written a blog on how to handle browser-based authentication for selenium webdriver.   Now it is for cypress. Cypress...