| || |
Negative Testing to Verify String length
I am trying to verify the length of a String I input in a text field. The text field's max length is 32 charectars.
If I input 33 charectars and exceed the limit then an error window pops up.
Here's the problem:
I am testing a java application.
If I use SetText and input 33 charectars in the field then the text in the field gets wiped out and a red rectangle appears around the text box and also an error window pops up. I can't seem to get focus on the error window and Silk test hangs after I set the text in the textbox.
Its a very simple testcase where i need to verify the length of string and if error occurs I need to close the error window and exit out of the application.
If I manually input all the 33 charectars not using (Ctrl+v) and hit enter it truncates 1 charectar and there are only 32 charectars with a green rectangle against the
text field and the error window appears. Though the error window appears the charectars in the field appear nothing is wiped out.
Why can't I get focus on the error window? I have captured the declarations of the error window but cannot get focus on it. Is the red rectangle causing the problems ? If so, how do I get rid of it?
Re: Negative Testing to Verify String length
I just used TypeKeys and it worked.