Can you tell us how the manual test case would look like? For example:
1. Note length of the field (eg:15).
2. Enter 15 characters. It should allow.
3. Enter 16 characters. Only 15 should be allowed. 16th truncated.
If this is the case, may be you can create a long string of say 100 characters (for example for numbers it can be 100 numbers in any order you like) and then use Left function to get the desired length and paste it in the field. Use appropriate checkpoint to see if the pasted characters are indeed available in the field.
I got the solution. Instead of calling twice the function, I want the function to generate the string depending on length. Thank you for your time. I appreciate it. This forum is really helpful.. Here it is.. Now, I am trying for AlphaNumeric string like this "A1B2C3" etc.
Public Function GenerateAlphaString(Type,lenth)