How to Handle Textbox, Checkbox and Radio Button

This tutorial illustrates how to handle Textbox, Checkbox, Radio buttons using Katalon Studio. The reference source code is provided at the end of the tutorial.

1.How to Handle Textbox

A textbox is a field that allows users to enter text as an input. Textbox and textarea are similar but the latter allows multiple lines and more characters.

Users can perform certain actions on textbox such as clear text, type text and validate the provided text using Katalon Studio.

Scenario: Verifying the provided text in textbox

  • Step 1: Launch Browser
  • Step 2: Navigate to URL
  • Step 3: Click on Make Appointment
  • Step 4: Enter username as “Katalon”
  • Step 5: Validate the Enter Username is correctly entered or not

Script Mode

Manual Mode

Handle textbox using Katalon Studio Manual mode

In the script mode above, Def is a keyword in Groovy used for declaration of variables. Username is a variable name, here storing the value “Katalon” in the username variable.

2. How to Handle Button and Checkbox

Scenario: To make an appointment

  • Step 1: Launch the application under test (URL: http://demoaut.katalon.com/).
  • Step 2: Click on Make Appointment (verify the button and click operation).
  • Step 3: Enter the valid username, password and click on Login button (verify the button and click operation).
  • Step 4: Make an appointment (check, uncheck the checkbox and verify check, uncheck status).

Script Mode

Manual Mode

Handle Button and Checkbox using Katalon Studio Manual mode

In the script above, the keyword VerifyElementClickable is used to validate whether the Make Appointment Button is clickable.

The keywords VerifyElementChecked and VerifyElementNotChecked are used to validate whether an element is checked or unchecked, respectively.

3. How to Handle Radio Button

Radio Button is a toggle-button that allows you to check the operations.
Scenario:  To make an appointment

  • Step 1: Launch the application under test (URL: http://demoaut.katalon.com/).
  • Step 2: Click on Make Appointment (verify the button and click operation).
  • Step 3: Enter a valid username, password and click on Login button (verify the button and click operation).
  • Step 4: Make an appointment (check, uncheck the Radio Button and verify radio button check, uncheck status).

Script Mode

Manual Mode

Handle Radio Button using Katalon Studio Manual Mode

 

The source code is available to be downloaded here.

For further instructions and help, refer to [WebUI] Text and [WebUI] Checkbox.

You can also refer to Katalon Studio Tutorials and Katalon Forum for more tutorials and discussions.

81% people found this helpful
Related testing tools
Katalon Studio
Best automation solution for software testing team. Completely free!
Katalon Recorder
Ultimate Selenium IDE to record, play, and debug app. Fast and extensible!
Katalon Analytics
Bring you to the next level of test execution reports. Smart and seamless solution!
Scroll up