In a nutshell
The equalsIgnoreCase() function performs a case-insensitive comparison to check whether two strings are equal. It takes two strings as arguments and returns True if both strings are equal and False if they are different. It is useful in test scripts where you need to compare two text values without strict case matching.
Overview
The equalsIgnoreCase() function takes two strings as arguments. It compares both the strings, and returns True if both are found to be equal. Otherwise, it returns False.
Note: This function performs a non case-sensitive search.
Return Type
Syntax
- <variable> = <string1>.equalsIgnoreCase(<string2>);
(OR)
- <variable> = equalsIgnoreCase( <string1>, <string2> );
| Parameter | Description | Data type |
|---|
| <variable> | Variable which will contain the boolean value, true or false. | BOOLEAN |
| <string1> | The string to be compared with string2. | TEXT |
| <string2> | The string to be compared with string1. | TEXT |
Examples
- Product = "ZohoQEngine";
- var = equalsIgnoreCase(Product, "ZohoQEngine"); //returns true
- Product ="ZohoQEngine";
- var = equalsIgnoreCase(Product, "Zoho QEngine"); //returns false