The PW box typically looks like this:
<input type ="password" maxlenght="25" . . .
That maxlength is what Eric wants to grab and set the lengh in PM to 25, in this case.
You should check for both the maxlength and the size attributes. Not all sites are correctly written, and many use the size attribute (size of the entry field) to limit the size of the password (which should be defined by maxlength).
If maxlength exists use it, otherwise fall back to size.
Rick DeBay