You could verify something like this:
browser.text_field(:name => "pw").attribute_value("type") ==
"password"

This checks that it is a password field and if it is a password field
then the password is masked by the browser. If you have a requirement
that it is masked and you don't trust browsers in this case then you
should just start trusting :)

Jarmo

On Feb 2, 9:12 pm, bis <bis...@gmail.com> wrote:
> sikuli might work for you
>
> On Thu, Feb 2, 2012 at 2:05 PM, Eric Mathiesen <mathiese...@gmail.com>wrote:
>
>
>
>
>
>
>
> > It is out of scope,  that's why I recomended a manual verification of the
> > condition under test.  I don't think any of the commercial products (quick
> > test pro, silk, etc...) have this ability...
>
> > Perhaps search for the * to exist might satisfy your condition...
> > Just a thought...
>
> > On Thu, Feb 2, 2012 at 9:59 AM, chaitanya <vengeance...@gmail.com> wrote:
>
> >> @Eric,
>
> >> I am doing the screenshot thing, but I have a requirement where they
> >> need a method which will explicitly return a true or a false if the
> >> password field is masked or not. But as @Zeljko states that since it
> >> is a browser feature, isn't it out of the scope of things which Watir
> >> can test?
>
> >> Dan, the value method returns an emtpy string. it does not return the
> >> string as a sequence of ******
>
> >> Thanks for the suggestions guys
>
> >> Chaitanya
>
> >> On Feb 2, 10:11 am, Željko Filipin <zeljko.fili...@gmail.com> wrote:
> >> > On Thu, Feb 2, 2012 at 11:44 AM, chaitanya <vengeance...@gmail.com>
> >> wrote:
> >> > > I was wondering whether there is any method in Watir which allows you
> >> > > to check whether the text in the password field is masked and not
> >> > > displayed as plain text.
>
> >> > I think that is a browser feature. I do not think I have ever seen a
> >> > password field that displayed it's contents.
>
> >> > Željko
> >> > --
> >> > watir.com/book - author
>
> >> --
> >> Before posting, please readhttp://watir.com/support. In short: search
> >> before you ask, be nice.
>
> >> watir-general@googlegroups.com
> >>http://groups.google.com/group/watir-general
> >> watir-general+unsubscr...@googlegroups.com<http://groups.google.com/group/watir-generalwatir-general+unsubscribe...>
>
> >  --
> > Before posting, please readhttp://watir.com/support. In short: search
> > before you ask, be nice.
>
> > watir-general@googlegroups.com
> >http://groups.google.com/group/watir-general
> > watir-general+unsubscr...@googlegroups.com

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to