jkk
jkk

Reputation: 45

Verify maximum length of a field using selenium IDE

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

Upvotes: 3

Views: 4572

Answers (2)

Dave Hunt
Dave Hunt

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

austin cheney
austin cheney

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

Related Questions