List Icon
Archive de la liste de diffusion

La liste de diffusion est fermée depuis juillet 2022, mais sert toujours d'archive d'informations sur QF-Test.
Cependant, si vous souhaitez rester informé des nouveautés concernant QF-Test, vous pouvez simplement vous abonner à la newsletter :
abonner à la newsletter 

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

Re: [QF-Test] Antwort: Recording Tooltip Text

  • Subject: Re: [QF-Test] Antwort: Recording Tooltip Text
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: Tue, 12 Aug 2014 07:46:12 +0200

Hi Henrik,

thanks for your answer, which is the correct approach for _checking_
the value of the tooltip.

Ron, if you really need to _fetch_ the tooltip, try a Jython SUT
script with

# Use the QF-Test ID of the component for the tooltip is shown
com = rc.getComponent("some id")
tt = com.getToolTipText()
# Either set a QF-Test variable
rc.setLocal("tooltip", tt)
# Or log the tooltip right away with report=true
rc.logMessage("Tooltip for ...: %s" % tt, report=true)

Best regards,

Henrik.Horneber@?.de writes:

> Hi,
> We faced the same issue,
> You can write a custom checker script as detailed in the manual.
> It's pretty straight-forward.
> I registered the checker for javax.swing.JComponent and all it does differently to the examples in
> the manual is that it is calling com.getToolTipText() to get the text.
> Best Regards / Mit freundlichen Grüßen
> Henrik Horneber
> Software Engineering
> Continental Reifen Deutschland GmbH
> Jädekamp 30, 30419 Hannover, Germany
> Postbox 169, 30001 Hannover, Germany
> Email: henrik.horneber@?.de
> Phone: +49-511-976 / 41 93 9
> Fax:   +49 511 976 36723
> _____________________________________________
> Continental Reifen Deutschland GmbH, Vahrenwalder Str. 9, D-30165 Hannover
> Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Nikolai
> Setzer; Geschaeftsfuehrer/Managing Director: Bernd Guenther, Burkhardt
> Koeller
> Sitz der Gesellschaft/Registered Office: Hannover,
> Registergericht/Registered Court: Amtsgericht Hannover HRB 204239,
> USt.-ID-Nr./VAT-ID-No. DE264920698
> _____________________________________________
> Proprietary and confidential. Distribution only by express authority of
> Continental AG or its subsidiaries.
> Von:        Ron Britzius <britziusr@?.net>
> An:        qftest-list@?.de,
> Datum:        10.08.2014 20:56
> Betreff:        [QF-Test] Recording Tooltip Text
> Gesendet von:        qftest-list-bounces@?.de
> --------------------------------------------------------------------------------------------------
> Hello,
> I am developing QF-Test Suites for simulation software that, among other things, simulates air
> missions. When an air mission fails, the user can mouse-over the GUI element that represents the
> mission and a tooltip will appear that details the reason the mission failed. I would like to be
> able to fetch the text from this tooltip to include it in our test-reports, but my direct attempt
> at doing so (creating a fetch-text node for the tooltip component) resulted in an exception
> stating that: This operation is not possible for a component of class 'javax.swing.JToolTip'. Is
> there an "outside-the-box" method for extracting text from components when this issue is
> encountered or will this be impossible to do.
> Thank you,
> Ron
Gregor Schmid

E: gregor.schmid@?.de
T: +49 (0)8171 38648-11
F: +49 (0)8171 38648-16

Quality First Software GmbH |
Tulpenstr. 41 | 82538 Geretsried | Germany
GF Gregor Schmid, Karlheinz Kellerer
HRB München 140833