0% found this document useful (0 votes)
49 views12 pages

03-Katalon IDE

Uploaded by

venkatbj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views12 pages

03-Katalon IDE

Uploaded by

venkatbj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Mind Q Selenium

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.

Installation of Katalon IDE:

Launch Chrome browser,,, if not available Download Chrome browser and install

Go to https://chrome.google.com/webstore/detail/katalon-recorder-selenium/

ljdobmomdgdljniojadhoplhkpialdid

Click “Add to Chrome” and install

After Installation, you can see a small icon on the chrome browser “ below image

the Circle”

11
Mind Q Selenium

Open the Katalon IDE

1. Toolbar

Katalon Recorder main toolbar contains buttons to help you to manage web recording
process.
Button Description

New Create new test case or test suite

Record For recording automation test

Play Execute selected single test case

Play Suite Execute selected test suite

Play All Execute all test suites

Pause/Resume Pause and Resume current execution

Stop Stop recording or the current execution

Export current test suite/test case to various scripting languages and


Export
framework

12
Mind Q Selenium

Speed Adjust execution speed

Port configuration for Katalon Studio Users. Allow users to change the
Setting default port used by Katalon Studio to communicate with the active
browser

Help icon Katalon Automation Recorder User Guide

Recording the first test case using Katalon IDE:

In the section we are seeing how to record the test case & re-run the test cases:

Launch Chrome browser

Launch Katalon IDE

Click Click Record Button

Enter URL https://www.google.com

In google page “Search for Software testing class” and click Search Button

In Katalon IDE “Stop Recording”

13
Mind Q Selenium

Enhance A Script Using Katalon IDE

Enhancement in the script to performed in order to validate actual behavior of the


application. We use following commands to perform enhancement in the script

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.

verifyElementNotPresent: This command returns value as TRUE if the specified element


was NOT FOUND anywhere in the web page. It returns value as FALSE if it is present
anywhere in the web page.

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

Verification of a Certain Text Presence: Following are the two commands in


Selenium IDE that are used for the presence of a certain text on a web page.

verifyTextPresent: This command returns value as TRUE if the specified text


string was FOUND anywhere in the webpage. Otherwise, if not FOUND then it
returns value as FALSE.

verifyTextNotPresent: This command returns value as TRUE if the specified


text string was NOT FOUND anywhere in the webpage. Otherwise, if FOUND
then it returns value as FALSE.

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.

Verification of Specific Position of an Element: The position of an element in Selenium IDE


are indicated by measuring (in pixels) that how far it is from the left or top edge of the
browser window. Below the two commands used in Selenium IDE for this purpose.

verifyElementPositionLeft: This command verifies that if the specified number of pixels


match the distance of the GUI element from the left edge of the web page. It will return a
FALSE value if the value specified does not match the distance from the left edge.

verifyElementPositionTop:This command verifies that if the specified number of pixels


match the distance of the GUI element from the top edge of the web page. It will return a
FALSE value if the value specified does not match the distance from the top edge.

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

These commands are used to retrieve the message

assertAlert & assertNotAlert of the alert and assert it to a string value that we

have specified for system and is under test.

assertAlertPresent & These commands are used to assert if an Alert is

20
Mind Q Selenium

present or not. They return Boolean values as TRUE

assertAlertNotPresent or FALSE.

This command is used to retrieve the alert message


storeAlert
and stores it in a variable that we have specified.

This command returns a TRUE value if an alert is


storeAlertPresent
present. Otherwise it returns a FALSE value.

These commands are used to retrieve the message

verifyAlert & verifyNotAlert of the alert and verify if it is equal to the string

value that we have specified.

verifyAlertPresent These commands are used to verify that if an Alert


is present or not. They return Boolean values as

&verifyAlertNotPresent TRUE or FALSE.

Katalon IDE Script Debugging

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.

When to use Katalon IDE:

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

You might also like