Mailingliste - Einträge 2005


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qftestJUI] How to check which component has the focus ?


  • Subject: Re: [qftestJUI] How to check which component has the focus ?
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: Thu, 20 Oct 2005 06:52:04 -0000

Hi Philippe,

you can use


com = rc.getComponent("qftest ID of component that should have focus")

rc.check(KeyboardFocusManager.getCurrentKeyboardFocusManager().getPermanentFocusOwner() == com, "Focus check")

Best regards,
    Greg


"Philippe Gaudin" <Philippe.Gaudin@?.com> writes:

>    Hi,
>
>
>
>    I would like to be able to write checks to verify that the focus is on
>    the expected component (this component is not always editable).
>
>
>
>    One idea I had was to create a simple class returning the
>    KeyboardFocusManager.getCurrentKeyboardFocusManager().getPermanentFocu
>    sOwner()... so I can get the Component owning the focus.
>
>
>
>    I could call the class method with Jython... but I would like to
>    compare this java.awt.Component with a component under the "Windows
>    and components"...
>
>
>
>    How can I do that ?
>
>
>
>    Any other ideas to check the focus ?
>
>
>
>    Thanks in advance !
>
>
>
>    Philippe Gaudin
> _______________________________________________
> qftestJUI-list mailing list
> qftestJUI-list@?.de
> http://www.qfs.de/mailman/listinfo/qftestjui-list

--
Gregor Schmid                                Gregor.Schmid@?.de
Quality First Software GmbH                     http://www.qfs.de
Tulpenstr. 41                                Tel: +49 8171 919870
DE-82538 Geretsried                          Fax: +49 8171 919876


Videos Downloads Dokumentation Kaufen Gratis Testen