how to verify character count of text field?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to verify character count of text field?

Rohit
I want to check the number of characters I can insert in a text field, & was thinking of using 'for loop' but it would not help as selenium tries to insert more than required character the field will not accept but test goes on without any failure, so is there a way to get character count of the text field?
Reply | Threaded
Open this post in threaded view
|

Re: how to verify character count of text field?

softwaretestingforum
Administrator
I guess you can check "maxlength" attribute for input element.
one example here - http://www.w3schools.com/tags/att_input_maxlength.asp

Is this what you are looking for?
~ seleniumtests.com