Code: Select all
[-] VerifyMaximumFieldLength (AppObject FieldName, Integer FieldLength)
[ ]
[ ] String TestString = ""
[ ]
[ ] TestString = String.Replicate("a",FieldLength)
[ ]
[ ] FieldName.SetText (TestString + "x", false)
[ ]
[ ] FieldName.VerifyValue(TestString)
If you include this function in your project, it will show up automatically in the Actions Explorer in the 'User Defined folder' so that you can easily drag it into your steps.