Mailingliste - Einträge 2005

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

Re: [qftestJUI] Checking when mouse cursor changes from hourglass shape to arrow shape

  • Subject: Re: [qftestJUI] Checking when mouse cursor changes from hourglass shape to arrow shape
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: Wed, 12 Oct 2005 07:02:02 -0000

Hi Moty,

qftest checks the hourglass cursor only when used in combination with
a GlassPane, an invisible component that covers the whole Window in
order to block Events.

To check for specific cursors manually you'll need to use Jython
scripting (no surprise here I guess :-). Something like

from java.awt import Cursor

com = rc.getComponent("qftestJUI Id of component")
cursor = com.getCursor()
raise ReturnException (cursor.getType() == Cursor.WAIT_CURSOR)

Put that in a Procedure node and it'll return 1 if the cursor is the
hourglass and 0 otherwise. Then combine a Loop, ProcedureCalls and
delays to wait for the cursor to change.

Note that you cannot wait for this to happen in the SUT script because
it will run on the AWT dispatch thread and thus block event handling
so that the cursor may never change.

Best regards,

"Moty Keret" <moty@?.com> writes:

> Hi,
> I'm trying to measure how much time it takes for the mouse's cursor to turn
> from an hourglass shape to arrow shape. In the user guide you refer to
> 'GlassPane' - Do you mean the 'hourglass' shape?. If so, according to the
> user guide, "qftestJUI handles this case automatically by waiting until the
> GlassPane disappears before delivering an event, performing a check, etc.".
> But in my SUT, even though the mouse has an 'hourglass' shape, qftest
> application continues to perform the events which come afterwards.
> Thank you,
> Moty

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