This is a simple Katalon Studio project for demonstration purpose. You can check this out onto your PC and execute with your Katalon Studio.
This will show you how I managed to use Applitools within Katalon Studio. Applitools is a visual testing and monitoring service. In this demo, a Test Case instanciates an Applitools' Eyes
object and calls its methods. The Eyes
object takes screenshots of AUT and transfer images to the Applitools service where various testing/monitoring features are offered.
I have experienced taking screenshot by Katalon keyword and found that taking screenshots is not enough. Taking screenshots is just a start. I will have to review all the images, think about them, and find problems if any. These tasks are difficult enough without appropriate tool's support.
One day I read a discussion in the Katalon Community Forum:
Until then I was not aware of Applitools. I got interested in it and thought the idea of using Applitools within Katalon Studio would worth a try.
After a dozen hours of hacking, I have created a Katalon project here. In this demo project, a Katalon Test Case invokes Applitools Eyes API. This demo works for me.
Applitools has a published article
This article gives me an example of writing and running a visual test using native Selenium WebDriver combined with Applitools' Eyes SDK.
So I replaced 'native Selenium WebDriver' with 'Katalon Studio'. I modified the published example slightly to form a Katalon Test Case in Groovy.
APPLITOOLS_API_KEY
to set the API Key as its value.Katalon Studio has its own set of dependencies. Applitools has its own. Nobody takes responsibility of making these two consistent.
As you can see test01, this sequence works:
WebUI.openBrowser('')
WebDriver innerDriver = DF.getWebDriver()
Eyes eyes = createEyes()
eyes.open(innerDriver, GlobalVariable.appName,
GlobalVariable.testName, viewportSize)
First you open the browser by calling WebUI.openBrowser(), after that you should get the reference to the WebDriver object created by Katalon Studio.
On the other hand the following code does not work:
WebDriver innerDriver = DF.getWebDriver()
WebUI.openBrowser('')
You will encounter an Exception which sais:
Test Cases/test01 FAILED because (of) com.kms.katalon.core.webui.exception.BrowserNotOpenedException: Browser is not opened