I just tried this on a login page, and "@browser.text_field(:id, /
pwd/).value" gave me the correct/expected text.  It appears that you
are setting your password field id descriptor with a variable(?), is
it possible you're accessing the wrong element?

Make sure to try $ie.text_field(:name, "WpaPswdConfirm").value first,
to ensure that the basic functionality is working before your
introduce complication.

Thanks,
Adam

On Jun 3, 7:58 pm, kashyap <kashyap...@gmail.com> wrote:
> Hi all,
>
> I am testing(using Watir) a web-form that has many text fields in
> it.One of the text-fields is a password type text field.
>
> The text-field's HTML is:
> <INPUT class="stdbox" type="password" maxLength="64"
> onchange="IsAlphaNumericOrSet( this.value, g_PswdSetChars, 'Confirm
> Password', this.title)" name="WpaPswdConfirm" value="" />
>
> The requirement is to check if the default password that is there on
> the text-field is a valid password or not.
> For this i need to get the value from that text-field.
>
> I tried the follwowing:
> passwordValue = $ie.text_field(:id, idPassword).value
>
> However, passwordValue has a value 1 in it.It is not giving me the
> exact value of the password.
>
> Is there any other way to retrieve the value from a text-field that is
> of type password?

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com

Reply via email to