Reputation: 45
i need to verify maximum allowed length for a field using selenium IDE. need advise from someone.
Upvotes: 3
Views: 4572
Reputation: 8223
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.
Upvotes: 5
Reputation:
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.
Upvotes: 3