Mailingliste - Einträge 2005


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

Re: [qftestJUI] waiting for a component of a given java class


  • Subject: Re: [qftestJUI] waiting for a component of a given java class
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: Mon, 04 Jul 2005 17:22:01 -0000

Hi Sylwia,

you've got your question almost right. It's not "How do I wait for a
component of a given class?", but "How do I reduce the influence of
the window title?".

This problem is pretty common. For a dialog there may be an easy way
out: With our qfs.qft library we are providing a NameResolver for
OptionPane dialogs. Most Swing message boxes are based on these and
the NameResolver helps a lot in this case. Its use is described in the
tutorial in section 8.9 "The optionpane utility package". Try that
first.

If it doesn't help, your options in increasing order of complexity are

- make the title a regexp

- convince development to use setName on the dialog

- write a NameResolver yourself

I recently gave a detailed description of how to use regexps for the
window title. Please see
http://www.qfs.de/archive/qftest-list/2005/msg00192.html

Best regards,
    Greg

farraige@?.pl writes:

> Hi,
>
> I know we can wait for a given component ID. But can we wait also
> for a component of a given java class? If so, then how can I do it
> (via jython)?
>
> I have the following problem: I have a tree containg profile names.
> After clicking a given tree item, the appropriate profile table is
> being opened. I make some modifications to the content of this table
> and press "Close" button". After that a confirmation dialog box "do
> you want to save modified data" is being displayed...
> The problem is that the qftestJUI always sets the following name for
> this dialog: dialogClose:_profileTableName, where profileTableName
> represents name of the profile.
>
> So after making modifications to the following profile tables: pcu,
> bscpack, bscbasic, qftestJUI records 3 separate componets:
> dialogClose:_pcu
> dialogClose:_bscpack
> dialogClose:_bscbasic
>
> For me it will be much more comportable if the qftestJUI would
> record just one component representing this dialog e.g.
> dialogClose:_profileTable
>
> In one of my procedures I would like to wait for this dialog. Now
> there is no easy way to implement a generic procedure waiting just
> for a confirmation dialog, because qftestJUI produces separate
> confirmation dialogs for each of the chosen profiles...
>
> That's why I started wondering if it is possible to wait for a
> component of a given class instead of waiting for a given component ID.
>
> Maybe NameResolvers can also bring a solution to my problem? But how
> such NameResolver should look like? I made a few experiments but
> with no success.
>
> Thank you in advance for your help.
>
> Best Regards,
> Sylwia

--
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