Skip to content

Iptv Assist

Learn More from us

Menu
  • HOW TO
  • Firestick
  • Chromecast
  • PC Apps
  • Lg Smart TV
  • IPTV Services
  • Automation Testing
  • Smart TV
  • Software Testing Tools
  • Contact Us
Menu

Sikuli GUI Automation Testing Tool – Beginner’s Guide Part #2

Posted on March 26, 2023

Best Iptv Service Provider 2023 With 40k+ Channels And 100k+ VOD . 24/7 Suppport . Paypal Supported

The most practical tutorials on Sikuli GUI automation testing tool:

Best Iptv Service Provider 2023 With 40k+ Channels And 150k+ VOD . Hurry Up

In part-1 of this “introduction to Sikuli tutorial series”, we have discussed Sikuli, how it works, and how to create a simple Sikuli project.

Recommended IPTV Service Providers

  1. IPTVGREAT – Rating 4.8/5 ( 600+ Reviews )
  2. IPTVRESALE – Rating 5/5 ( 200+ Reviews )
  3. IPTVGANG – Rating 4.7/5 ( 1200+ Reviews )
  4. IPTVUNLOCK – Rating 5/5 ( 65 Reviews )
  5. IPTVFOLLOW -Rating 5/5 ( 48 Reviews )
  6. IPTVTOPS – Rating 5/5 ( 43 Reviews )

 

In this 2nd part, you are going to learn some advanced concepts like – how to create Sikuli Maven project and how Sikuli can be used with Selenium WebDriver to automate web pages.

This part is essential because there is no built-in method to open a website/web application in Sikuli. So whenever you’re executing a Sikuli script, you need to make sure that the website is already opened in a browser. It is an overhead task.

Sikuli GUI Automation Testing Tool

To overcome this, Sikuli can be used together with Selenium WebDriver. Selenium contains a method to open a website in a browser. After opening the website, we are able to run Sikuli scripts on that website.

What You Will Learn:

  • Create A Sikuli Maven Project
    • Installing Eclipse Maven Plugin
    • Installing Apache Maven
    • Install Sikuli Script Jar In Maven Repository
    • Creating The Sikuli Maven Project
    • Sikuli Example Program: Open A File In Windows Explorer
    • Executing The Sikuli Maven Project From Command Line
    • Selenium Vs Sikuli
  • Integrating Sikuli With Selenium WebDriver
  • Conclusion

Create A Sikuli Maven Project

Installing Eclipse Maven Plugin

Step #1) Open Eclipse, Go to Help   -> Install a new Software. Click on the “Add” button and add the following URL.

sikuili10.

Click on the “OK” button.

Step #2) Check All the checkboxes listed, click “Next” and install the Maven plugin.

sikuili11

Installing Apache Maven

Step #1) Download the latest version of the Maven from here.

Step #2) Extract the downloaded zip file and put it under somewhere in your machine.
Copy the bin folder path of Maven, and append the path in the environment variable.
(It requires a JAVA_HOME variable in the environment variable. Please set the JAVA_HOME variable in your environment)

Step #3) Check whether maven installed correctly, Open command prompt and type “mvn -version”. It should return something like this,

sikuli12

It indicates Maven successfully installed on your machine.

Install Sikuli Script Jar In Maven Repository

As I mentioned in part -1, we’ve already got sikuli-script.jar, next we need to install sikuli-script.jar in the maven repository.
By using the following command we can install sikuli-script.jar in the maven repository.

Mvn install: install-file -Dfile=D:JarsSikuli-r930win32Sikuli-IDEsikuli-script.jar -DgroupId=com.test.sikuli -DartifactId=sikuli -Dversion-1.0.1 -Dpackaging=jar

sikuli13

Creating The Sikuli Maven Project

Step #1) Open Eclipse and create a new Maven Project.

Step #2) Add the following dependencies in your POM file.

<dependency>
<groupId>com.test.sikuli</groupId>
<artifactId>sikuli</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>

sikuli14

Step #3) Create a package inside src/test/java and Create a class inside the package. Now you can start writing the Sikuli script inside this class.

Sikuli Example Program: Open A File In Windows Explorer

Step #1) Create a Sikuli Maven Project, as explained above.

Step #2) Take the screenshot of the required elements and put it inside the Maven project.

sikuli15

– file.png

Step #3) Create a class with name “Test1”, and Paste the following code inside the sikuli class.

package com.test;

import org.junit.Test;
import org.sikuli.script.FindFailed;
import org.sikuli.script.Screen;

public class Test1 {

@Test
public&nbsp; void openFileTest() throws FindFailed, InterruptedException {
// TODO Auto-generated method stub
Screen s=new Screen();
s.find("file.png");
s.doubleClick("file.png");
System.out.println("File icon clicked");

}
} 

Executing The Sikuli Maven Project From Command Line

Step #1) Open Command Prompt and cd to the project directory.

Step #2) Execute the above project from a command prompt using the following command.

mvn clean test -Dtest=Test1

sikuli16

Selenium Vs Sikuli

sikuli17

Integrating Sikuli With Selenium WebDriver

Step #1) Create a new Java Project in eclipse by clicking New -> Java project.

Step #2) 

  1. Right-click on the Project Go to Build Path   -> Configure Build Path.
  2. Switch to Libraries Tab.
  3. Click on “Add External Jars” and Add Selenium library jars as well as Sikuli-scritp.jar

sikuli18

Step #3) Create a package inside src/ folder and create a class under that package.

Step #4) Take All required screenshot of web elements and save inside the project.

Step #5) Copy the following code inside that class.

package com.test;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.sikuli.script.FindFailed;
import org.sikuli.script.Screen;

public class OnlinePainting {

public static void main(String[] args) throws FindFailed {
// TODO Auto-generated method stub

WebDriver driver=new FirefoxDriver();
WebDriverWait wait=new WebDriverWait(driver,20);
driver.manage().window().maximize();
driver.get("http://www.thecolor.com/Coloring/a-puppy-with-a-kitten.aspx");
Screen screen=new Screen();
screen.wait("1398665726055.png", 20);
screen.click("1398666382715.png");
screen.click("1398666248846.png");
screen.click("1398666729252.png");
screen.click("1398666188894.png");
screen.click("1398665763634.png");
screen.click("1398666592027.png");
screen.click("1398666610951.png");
screen.click("1398666308624.png");
screen.click("1398666326406.png");
screen.click("1398666570749.png");
screen.click("1398666703708.png");
screen.click("1398666382715.png");
screen.click("1398666857321.png");
screen.waitVanish("1398665763634.png");

}
} 

Step #6) Right-click on the project, Select RunAs -> Java Application.

Before Execution:

sikuli19
After Execution:

sikuli20

Conclusion

  • Sikuli scripts can be easily integrated with Selenium WebDriver to automate flash websites.
  • Sikuli can automate windows as well as all other applications.
  • As it uses a Visual match, we can automate almost anything, we see on the screen.
  • It provides extensive support to Flash objects. i.e. we can automate adobe flash player components. (Audio player, video player)
  • Sikuli scripts can be created as a Maven Project and can be run from command prompt.
  • Hence, Sikuli is most friendly, automation tool to automate challenging flash/windows applications.

Feel free to post your queries in comments.

=> Check ALL Sikuli Tutorials Here.

Related

Best Iptv Service Provider 2023 With 40k+ Channels And 150k+ VOD . Hurry Up

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • IPTV List: Best iptv lista 2023
  • IPTV Premium: Best Premium IPTV Service Provider List And Benefits
  • Nikon IPTV Review: Over 10,000 Live Channels for $12/Month
  • Iptvwings. Com Review: +18000 Live IPTV Channels ,+70000 Movies, +40000 TV show For $15/1 month
  • IPTVUNO Review: More Than 16000 Live TV channels, 55,000 Movies & VOD For $15/Month

Recent Comments

  1. IPTV List: Play lista iptv 2022 - Iptv Assist on Best IPTV Player in 2023 for Watching Live TV
  2. Cola IPTV – Over 18,000 Live Channels for $12/Month - Iptv Assist on FileLinked – How to Install on Firestick/Fire TV and Android Devices
  3. Cola IPTV – Over 18,000 Live Channels for $12/Month - Iptv Assist on 50+ Best IPTV Service Providers for Streaming Live TV 2023
  4. XoomsTV IPTV – Over 11,000 Channels & VOD for Under $13/Month on Best VPN for IPTV in 2023 and How to Install on Firestick/Android
  5. Voodoo Streams IPTV Review – Over 12,000 Channels for $11/Month - Iptv Assist on Dynasty TV IPTV Review – Over 6,000 Channels for $10/Month

Archives

  • March 2023

Categories

  • Activate
  • Agile Testing
  • Alternatives
  • Android
  • APK
  • Apple TV
  • Automation Testing
  • Basics of Software Testing
  • Best Apps
  • Breakfast Hours
  • Bug Defect tracking
  • Career in Software Testing
  • Chromebook
  • Chromecast
  • Cross Platform
  • Database Testing
  • Delete Account
  • Discord
  • Error Code
  • Firestick
  • Gaming
  • General
  • Google TV
  • Hisense Smart TV
  • HOW TO
  • Interview Questions
  • iPhone
  • IPTV
  • IPTV Apps
  • Iptv Service SP
  • IPTV Services
  • JVC Smart TV
  • Kodi
  • Lg Smart TV
  • Manual Testing
  • MI TV
  • Mobile Testing
  • Mod APK
  • newestiptv.com
  • News
  • Nintendo Switch
  • Panasonic Smart TV
  • PC Apps
  • Performance Testing
  • Philips Smart TV
  • PS4
  • PS5
  • Python
  • QA Certifications
  • QA Leadership
  • QA Team Skills
  • Quality Assurance
  • Reddit
  • Reviews
  • Roku
  • Samsung Smart TV
  • Screenshot
  • Selenium Tutorials
  • Sharp Smart TV
  • Skyworth Smart TV
  • Smart TV
  • Soft Skills For Testers
  • Software Testing Templates
  • Software Testing Tools
  • Software Testing Training
  • Sony Smart TV
  • Sports
  • Streaming Apps
  • Streaming Devices
  • Tech News
  • Test Management Tools
  • Test Strategy
  • Testing Best Practices
  • Testing Concepts
  • Testing Methodologies
  • Testing News
  • Testing Skill Improvement
  • Testing Tips and Resources
  • Toshiba Smart TV
  • Tutorials
  • Twitch
  • Types of Testing
  • Uncategorized
  • Vizio Smart TV
  • VPN
  • Web Testing
  • What is
  • Xbox
©2023 Iptv Assist | Design: Newspaperly WordPress Theme