Micro Focus QTP (UFT) Forums

Full Version: how to set value which is more than 255 length to text fileld
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi,

I tired to enter the value which is 256 length by the following statement

Code:
browser("Test").Page("Test").WebEdit("Test"). Set "string 256 lenght"

- Error "Invalid parameter" gets displayed

How can we set the value which is 256 length to text field
Hi Anbarasu,

Check the WebEdit("Test")'s 'max length' property is set to 255. If you set a string more that 'max length', QTP will through the error message.

If it is 'max length' is 255, you can't set a string with 256 length.
S... U are rite..
But, how can we verify that the field is not accepting the data which exceeds its max length

On error we can skip this step and proceed to next step.. But how can we capture that "In correct parameter" gets displayed while executing the step (entering max length +1)
How would you do it manually ?? I guess the application would throw a error message stating the length is long or something like that...Does it not ?

if you get that message then you can see for the text and determine.