Logo QF-Test

Im Archiv der Mailingliste
wertvolle Antworten finden.

 

Gratis Testen  Download  Kaufen

Thomas Max, QF-Test Training und Support

Tipp für die Recherche in der Mailingliste: Volltextsuche (oben) verwenden.

Thomas Max,
Sr. Software Engineer & Trainer, QFS

2016 bis heute 2015 | 2014 | 2013 | 2012 | 2011 2010 2009 | 2008 | 2007

(ältere Archiveinträge vor 2007 nicht dargestellt, aber in der Suche enthalten)

Mailingliste - Einträge 2007


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

Re: [QF-Test] Fetch Text Node and the apostrophe '


  • Subject: Re: [QF-Test] Fetch Text Node and the apostrophe '
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: 22 Oct 2007 16:43:44 +0200

Hello Michael,

from the second screenshot I gather that you are expanding the
variable you read from the SUT in an If node with a condition similar
to

"$(text)" == "something"

The explanation for the 'Condition' attribute in manual section 18.6.4
includes the following:

    Note: Accessing QF-Test variables in a condition follows the same
    rules as in Jython scripts (see subsection 14.3.3). You can use
    the standard QF-Test syntax $(...) and ${...:...} for numeric or
    boolean values. String values should be accessed with
    rc.lookup(...).


So simply use

rc.lookup("text") == "something"

instead and you should be fine. The same applies to all condition
attributes and to SUT or Server script nodes, i.e. all places where a
$(...) expression would be expanded _before_ being passed to the
Jython interpreter - potentially causing problems due to embedded
special characters - whereas rc.lookup("...") is expanded by the
Jython interpreter.

Best regards,
    Greg

Michael.Weinen@?.net writes:

>    Hi,
>    I need to read out a text of the Staus Line (ComboBox) from the SUT to
>    decide the further reactions in my Test Suite.
>    So far no problem: I simple use the Fetch Text Node of QF-Test.
>    But the String given out by the SUT often contains an simple apostrophe
>    ' .
>    In this cases the following Processes e. g. all checks or SUT Scripts
>    break with an Error Message "Invalid Syntax".
>    For better understanding I will put 2 screenshots as attachment to this
>    e-mail.
>    How can i do the checks on this variables?
>    Is it possible to filter the apostrophes or all special signs out of
>    the variable - perhaps with an SUT Script?
>    A workaround wold be to split or cute the text before this special
>    sign, but all my attempts of this result in the same error.
>    Thanks for your assistance
>    Michael
>    ______________________________________________________________________
>
>    Michael Weinen
>    Application Support Specialist
>    VEDA GmbH
>    Carl-Zeiss-Straße 14
>    52477 Alsdorf
>    Tel.:   +49 2404 5507-1647
>    Fax:    +49 2404 5507-2647
>    E-Mail: [1]michael.weinen@?.net
>    Web:    [2]http://www.veda.net
>    VEDA GmbH, Amtsgericht Aachen HRB 1501,
>    Geschäftsführer: Dr. Ralf Gräßler & Klaus Pohlmann
>    Sitz der Gesellschaft: Alsdorf
>
>            Fortschritt durch Innovation - Wirkung. Immer. Überall.
>
>    [3]VEDA Forum 2007 21. - 22. November 2007 Sofitel Aachen Quellenhof

--
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
GF: Gregor Schmid, Karlheinz Kellerer          HRB München 140833



Videos Downloads Dokumentation Kaufen Gratis Testen