03-Katalon IDE
03-Katalon IDE
Katalon IDE
Introduction to Katalon IDE
It is a recording tool which generates script for the user actions on the browser and it
is replacement of Selenium IDE.
The Katalon-IDE (Integrated Development Environment) is the tool you use to develop
your test cases. It’s an easy-to-use on latest versions of Firefox / Chrome plug-in and is
generally the most efficient way to develop test cases. It also contains a context menu
that allows you to first select a UI element from the browser’s currently displayed
page and then select from a list of Selenium commands with parameters pre-defined
according to the context of the selected UI element. This is not only a time-saver, but
also an excellent way of learning Selenium script syntax.
Launch Chrome browser,,, if not available Download Chrome browser and install
Go to https://chrome.google.com/webstore/detail/katalon-recorder-selenium/
ljdobmomdgdljniojadhoplhkpialdid
After Installation, you can see a small icon on the chrome browser “ below image
the Circle”
11
Mind Q Selenium
1. Toolbar
Katalon Recorder main toolbar contains buttons to help you to manage web recording
process.
Button Description
12
Mind Q Selenium
Port configuration for Katalon Studio Users. Allow users to change the
Setting default port used by Katalon Studio to communicate with the active
browser
In the section we are seeing how to record the test case & re-run the test cases:
In google page “Search for Software testing class” and click Search Button
13
Mind Q Selenium
Verification of an Element Presence: Following are the two commands in Katalon IDE that
are used for the presence of a GUI element on a web page.
verifyElementPresent: This command returns value as TRUE if the specified element was
FOUND in the web page. It returns value as FALSE if not FOUND.
In the below example on Katalon IDE, we are testing Facebook login URL. On this page we
are verifying above two commands for Target id=email and id=xyz. Considering the
scenarios and function of above two commands below is the test output. It is to be noted
that on Facebook login page id=email is present, but id=xyz is not present, hence the
output.
14
Mind Q Selenium
15
Mind Q Selenium
In the below example on Selenium IDE, we are testing Facebook login URL. On this page
we are verifying above two commands for texts as ‘Facebook’ and ‘Twitter’. Considering
the scenarios and function of above two commands below is the test output. It is to be
noted that on Facebook login page, the text as ‘Facebook’ is present but the text as
‘Twitter’ is not present. Hence the output.
16
Mind Q Selenium
In the below example on Katalon IDE, we are testing Facebook login URL. On this page we
are verifying above two commands for position of GUI element id=email. Considering the
scenarios and function of above two commands below is the test output. It is to be noted
that on Facebook login page, the position of GUI element id=email is not matching the
value in pixels measured for top and left of the page, hence the output.
Wait commands: In Katalon IDE, given below are the commands that will wait for a new
page to load before moving onto the next command.
clickAndWait: This command will wait for the new webpage to load after click command is
executed by the Katalon IDE to record further results on the new page.
typeAndWait: This command will wait for the new webpage to load after type command
is executed by the Katalon IDE to record further results on the new page.
selectAndWait: This command will wait for the new webpage to load after select
command is executed by the Katalon IDE to record further results on the new page.
17
Mind Q Selenium
Given below is the demonstration of the failed attempt to login on Facebook using Katalon
IDE.
Use of waitFor commands: In Katalon IDE, following are the commands that wait for a
specified condition to become true before it proceeds to execute the next command
(irrespective of loading of a new page). These commands could be more useful to test
AJAX-based dynamic websites where the elements values are changed without reloading
the whole page. These commands are:
waitForTitle: This command will make Katalon IDE to wait to execute next command until
the given title is available.
waitForTextPresent: This command will make Katalon IDE to wait to execute next
command until the given Text is present.
waitForAlert: This command will make Katalon IDE to wait to execute next command until
the given alert is popped up.
18
Mind Q Selenium
Storing Variables and the Echo command: Katalon IDE has the feature to store the value
in a variable and later use or echo that value using the following commands.
Store: We can use store command to store variables in Katalon IDE. Below is the
illustration of store command, here we are storing the value “SoftwareTestingClass” to a
variable named “newVariable“. Later we are typing this stored value into Facebook login
page for element ‘id=email’ by simply enclosing it in a ${…} symbol e.g. ${newVariable}.
StoreElementPresent: In Katalon IDE, this command just stores Boolean values which are
either “true” or “false” depending on the presence of the specified element. Below is the
illustration of such example.
In the below example, on the Facebook login page we are looking for elements id=email
(which is present) and id=gmail (which is not present). We are storing the Boolean output
of command ‘StoreElementPresent’ in variables myVal1 and myVal2. When this test is
executed on Katalon IDE, both of these variables with get value as TRUE and FALSE
respectively as former element is present on the web page however latter element is
absent on the web page, hence the result as shown below.
Here ‘echo’ command is used to echo the values of the variables which are present in the
test log.
19
Mind Q Selenium
Alerts, Pop-up, and Multiple Windows: Katalon IDE supports several commands to test
alerts, pop-ups and multiple windows. Some of them are explained below.
Alerts: Alerts can be considered as the simplest form of pop-up windows. Following are
the most common Katalon IDE commands used in handling alerts.
Commands Description
assertAlert & assertNotAlert of the alert and assert it to a string value that we
20
Mind Q Selenium
assertAlertNotPresent or FALSE.
verifyAlert & verifyNotAlert of the alert and verify if it is equal to the string
Katalon IDE supports the setting of breakpoints and the functionality to start and stop the
running of a test case.
Users can run up to a specific command in the middle of the test case and inspect how the
test case behaves at that point.
21
Mind Q Selenium
To do this, the user needs to set a breakpoint on the command just before the one to be
examined.
As shown on the picture above, the command "Toggle Breakpoint", "Play This Command”,
and "Play From Here" will help debug.
To set a breakpoint, select a command, right-click, and from the context menu select
Toggle Breakpoint. Then click the Run button to run your test case from the beginning up
to the breakpoint.
To set a startpoint, select a command, right-click, and from the context menu select Play
From Here. Then click the Run button to execute the test case beginning at that startpoint.
We can use the tool to check the compatability of the application with Selenium
We can use the tool to generate script on the web objects which we not able to
identify the object Properties and understand how the tool can identify / which
properties it uses.
22