tags:

views:

324

answers:

3

i need to verify maximum allowed length for a field using selenium IDE. need advise from someone.

+3  A: 

Using Selenium enter data into the field that is longer than the expected allowance. Then read from the field to determine if the maxchar attribute on the input field in question has limited your input.

A: 

Is there any defined command to identify the max length of a field ?

jkk
I'm not going to vote you down on this since you are new to SO, but generally here we do not ask followup questions by posting answers. Please edit your original question or use the comments system to add extra information rather than posting an answer.
TM
thanks for advising :)
jkk
+1  A: 

You can use the assertAttribute command as follows:

assertAttribute | id=myTextField@maxlength | 20

Replace 'id=myTextField' above with the appropriate locator, and '20' with the expected max length.

Dave Hunt