Verify maximum length of a field using selenium IDE Verify maximum length of a field using selenium IDE selenium selenium

Verify maximum length of a field using selenium IDE


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.


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.