How to Integrate Sikuli with Selenium Webdriver

This article will help you to understand how we can integrate sikuli with selenium webdriver and how to start with automation testcases.Sikuli is another tool which is extremely useful in some cases.

Integrate Sikuli with selenium webdriver

When I started working with Selenium I used to face so many issues related to XPath and CSS so now we are going to remove all this from the script.

 

Integrate Sikuli with Selenium Webdriver

 

We can remove all these locators from the script now using another tool called Sikuli. Sikuli is another open source tool for automation

We can combine Selenium with Sikuli as well and can perform activity based on your requirement like type, click etc.

 Advantage of Sikuli

1-It is Open source tool like Selenium.

2-We can integrate with Selenium and with other tools as well.

3- An Important feature of Sikuli, it can identify object-using images/screenshots it means you can capture images for the script and can perform your operations as well depends on your requirement.

Note- in UFT this feature is known as Inside Object like Sikuli

4-Flash testing.

5-Mobile Testing.

6-Windows/Desktop application testing.

We have so many other advantages as well please go through the official docs.

 Sikuli Setup for Selenium

1-Download Sikuli jars from here (My Google Driver)- Download Jars

2- Add Sikuli jar into your project.

Once Setup is complete then we can start writing selenium/sikuli scripts.

We will use some Sikuli classes that we will get once we will add that jars into the project.

1-Screen – This is a class, which will focus on the screen.

2- Pattern- This is another class, which will focus on images.

 

 Sample Script-Integrate Sikuli with Selenium Webdriver

This script will perform following activity

1-       Launch any browser and navigate to google.com (using Selenium)

2-      Click on Gmail button (using Selenium)

3-      On Gmail enter email, password and will click on login button (using Sikuli code)

 

Sikuli-Selenium Program

 

Below images, I used in the script.

Integrate Sikuli with Selenium Webdriver

 

Integrate Sikuli with Selenium Webdriver

Integrate Sikuli with Selenium Webdriver
Output-

 

Note- If you get error message the you have to restart your system and run the same script again

For any query join Selenium group- Join Selenium Group

Thanks for visiting my blog. Keep in touch. Have a nice day 🙂

 

 

23 Comments

  1. CG
  2. PriyaMuthuvel
  3. Suresh Sharma
  4. sudhr
  5. Ratnesh Sharma
  6. yogesh
  7. Chitra
      • Chitra
        • Chitra
  8. sudhr
  9. saurabh
  10. kishore

Leave a Reply