Test Cases for a Text Box | Text Field

.
Sample Test Cases for TextBox

Here!!! Some of the important test cases for the text field are given below.


UI Test Cases For Text Box

  • Check whether the text box is properly visible to the user or not.
  • Verify whether the alignment and placement of the text box on the page are as per requirement or not.
  • Check whether the placeholder and label are as per requirement and visible to the user or not.
  • Check whether the colour, font and size are as per requirement or not.
  • Verify the alert message when the user enters the invalid data.
  • Check the responsiveness of the field.
  • Verify the behaviour of the text box when the user controls through the keyboard.

Functional Test Cases for Text Box

  • First, verify that the user is able to click on a text box or not.
  • Check whether the user is able to type in the text box or not.
  • Check whether the typed text is properly visible to the user or not.
  • Verify the text box by entering the alphanumeric characters. 
  • Check for the alphabet, which is accepted in both upper and lowercase cases.
  • Test the text box by entering the special characters (e.g., @, #, $). 
  • Verify the text box when the user provides empty input. 
  • Verify the text box maximum and minimum character limit. 
  • verify the undo and redo functionality within the text box. 
  • Check that users can copy and paste text from and to the text box or not. 


How to write test cases for textbox



Inputs For Text Box Box

  • Max Length of chars 
  • AlphaNumeric 
  • numeric 
  • Min Length of chars 
  • Space Between words 
  • Leading and Trailing Spaces 
  • Special Char 
  • Unicode Char 
  • <script>alert("123")</script> 
  • user@Testers.com 
  • Bala12061911 
  • </br> 
  • alert("Bala") 
  • SQL Injection

we can use the above test cases for the Username Text field, name field, phone number field etc. Some of the scenarios may change according to requirements.

How to write test cases for text box

To write test cases for the textbox first, we have to understand the basic requirements for the particular textbox. After understanding the requirement for the text field we need to identify the test cases, you can use the above test cases for the text field some of the test cases will be common for all types of text boxes (Username Text field, name field, phone number field ). and some of text cases may change as per requirements.

Hope !! The Above test case for the textbox is helpful for you ...

Team,
QA acharya

Also Read:
How to Handle TextBox In Selenium Webdriver Using Java?


Share Your Knowledge With Us -
Mail your content - qaacharya.in@gmail.com


Test cases for textbox