Features
< Back to Blog Overview

Sikuli Testing in the Cloud

2015-12-30
Cloud testing with Sikuli and Selenium WebDriver
  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn
  • Share on HackerNews

Sikuli is able to automate anything you see on your computer screen by using image recognition to identify components you want to interact with. This is very useful if you want to test things that are not easy to automate, for example native OS GUI components.


Since Sikuli runs on Windows, Mac and Linux - it is extremely useful to use during your tests.

TestingBot now supports Sikuli on all VMs: Windows (XP, VISTA, 8, 10), Linux (Ubuntu) and OS-X (Mavericks, Yosemite, El Capitan, Sierra, High-Sierra, Mojave).


By supplying a sikuli option in your desired capabilities, TestingBot will automatically download the Sikuli script you specified and run it at the start of your Selenium WebDriver test.


An example on how to automatically click a Chrome dialog button, allowing Chrome to install a Chrome extension:

sikuli cloud example

This will wait for a button called "Add extension" to appear on the screen. Once it appears, Sikuli will click the button automatically. We have to use Sikuli for clicking this button since WebDriver is not able to do this.


Of course, you can use Sikuli to do other things as well: clicking the browser menu, save as bookmark, install a plugin, ...

Integration with TestingBot

At TestingBot, we can run your Sikuli script at the start of your Selenium WebDriver test. Simply create a zip-file with one or more of your .sikuli scripts inside. Then use that URL in your desired_capabilities when starting a test.


This way you can run Sikuli tests in the cloud on all our platforms.


An example:
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("platform", "VISTA");
caps.setCapability("version", "9");
caps.setCapability("browserName", "internet explorer");
caps.setCapability("sikuli", "http://mywebsite.com/sikuli-scripts.zip");

Example automatically add Chrome extension

Below is an example in Ruby on how to install a Chrome extension on our VMs at the start of your test, automatically.

Copy code
require "rubygems"
require "selenium-webdriver"
require "selenium/client"

caps = {
  :browserName => "chrome",
  :platform => "CAPITAN",
  :sikuli => "http://mywebsite.com/sikuli-example.zip"
}

urlhub = "http://hub.testingbot.com/wd/hub"
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 120

@webdriver = Selenium::WebDriver.for :remote, :url => urlhub, :desired_capabilities => caps, :http_client => client
@webdriver.navigate.to "https://chrome.google.com/webstore/detail/office-editing-for-docs-s/gbkeegbaiigmenfmjfclcdgdpimamgkj"
sleep 3
@webdriver.find_element(:css, '.webstore-test-button-label').click
sleep 20
# now wait for Sikuli to automatically click the button

@webdriver.quit
TestingBot Logo

Sign up for a Free Trial

Start testing your apps with TestingBot.

No credit card required.

Other Articles

blank

Since a lot of websites have upload functionality, it's important to know that this can be tested via Selenium. Uploading a file during a test

Read more
blank

To keep up with the ever-changing world of software/development and testing, we keep on working to improve TestingBot and add new features. These l...

Read more
blank

Today TestingBot has added a new feature that should help you debug issues you encounter when running automated tests. Suppose you're running a t...

Read more
blank

With Robot Framework you can build easy to read test cases, which can then be run via Selenium WebDriver on our Selenium Grid. It allows using ke...

Read more
blank

This week we've been adding many more browser versions to our list of browsers you can pick from. You can now instantly launch a Chrome browser ...

Read more
blank

Windows 10 is now available on TestingBot to use during both manual and automated testing (Selenium WebDriver). This is the latest OS version avai...

Read more