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] Printing and logging HTML text in a variable does not work


  • Subject: Re: [QF-Test] Printing and logging HTML text in a variable does not work
  • From: "Robert Lahmer, QFS support" <support@?.de>
  • Date: Wed, 16 May 2007 20:13:01 +0200


Hello Hans,

I suppose you use a simple

 print "$(mytext)"

expression in a Jython script to print out the fetched text. You should be
cautious in using this syntax, because this way the variable is expanded
before it is passed to the script. Best use always rc.lookup():

 print rc.lookup("mytext")
 # Do avoid the short hand for rc.lookup:
 #print "$(mytext)"


Best regards,
   Robert


--On Mittwoch, Mai 16, 2007 07:41:37 -0700 Hans Schwaebli
<hans_schwaebli@?.com> wrote:

I fetch text from a dialog and put it in a variable.

  The text is:

  <html>
  <head>

  </head>
  <body>
    ComJCoffee-ERR-BASE-002161<br><br>Bei der &#220;berpr&#252;fung des
Datenobjektes      &quot;Auftragsposition '10030' '17' '49300493'
'Schuhe'&quot; traten folgende      Abweichungen auf:<br>
      <table cellpadding="3" align="left" valign="top">
      <tr>
        <td>
          Lieferwoche
        </td>
        <td>
          Eingegebene Woche darf nicht in der Vergangenheit liegen.
        </td>
      </tr>
    </table>
  </body>
</html>

  When I want to print the text (or log it), QF Test says:

  de.qfs.apps.qftest.shared.exceptions.ScriptException: The script failed
with the following message: Traceback (innermost last):
  File "<string>", line 1, in ?
  File
"U:\projects\HSW_GUI-TEST\tools\qftest\qftest-2.0.2-p1\jython\Lib\qfclien
t.py", line 90, in runscript   File
"U:\projects\HSW_GUI-TEST\tools\qftest\qftest-2.0.2-p1\jython\Lib\qfcommo
n.py", line 357, in runscript   File "C:\Dokumente und
Einstellungen\hkg493.HKG\.qftest\_script7878.py", line 1  print "<html>
              ^
SyntaxError: Lexical error at line 1, column 14.  Encountered: "\n" (10),
after : ""    at de.qfs.apps.qftest.client.awt.am.a(SourceFile:1250)
 at de.qfs.apps.qftest.client.J.a(SourceFile:1191)
 at de.qfs.apps.qftest.client.b.run(SourceFile:108)
 at java.security.AccessController.doPrivileged(Native Method)
 at de.qfs.apps.qftest.client.T.run(SourceFile:72)
 at de.qfs.lib.util.ThreadPool$PoolThread.run(ThreadPool.java:527)
 at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemo
teCall.java:247)  at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
 at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:343)
 at
de.qfs.apps.qftest.shared.rmi.sut.RemotePlaybackImplBase_Stub.runScript(U
nknown Source)  at de.qfs.apps.qftest.run.l.runScript(SourceFile:999)
 at de.qfs.apps.qftest.step.ClientScriptStep.exec(SourceFile:225)
 at de.qfs.apps.qftest.run.AbstractRunContext.call(SourceFile:1265)
 at de.qfs.apps.qftest.step.TryStep.exec(SourceFile:251)
 at de.qfs.apps.qftest.step.TryStep.exec(SourceFile:198)
 at de.qfs.apps.qftest.run.AbstractRunContext.call(SourceFile:1265)
 at de.qfs.apps.qftest.step.BasicSequence.exec(SourceFile:725)
 at de.qfs.apps.qftest.step.BasicSequence.exec(SourceFile:677)
 at de.qfs.apps.qftest.step.Procedure.exec(SourceFile:198)
 at de.qfs.apps.qftest.run.AbstractRunContext.call(SourceFile:1265)
 at
de.qfs.apps.qftest.run.AbstractRunContext.callProcedure(SourceFile:2258)
 at
de.qfs.apps.qftest.run.AbstractRunContext.callProcedure(SourceFile:2156)
 at de.qfs.apps.qftest.step.ProcedureCall.exec(SourceFile:445)
 at de.qfs.apps.qftest.run.AbstractRunContext.call(SourceFile:1265)
 at de.qfs.apps.qftest.run.AbstractRunContext.run(SourceFile:909)
 at de.qfs.apps.qftest.run.AbstractRunContext.run(SourceFile:838)
 at de.qfs.apps.qftest.run.I.run(SourceFile:6717)

  What is wrong?


---------------------------------
Building a website is a piece of cake.
Yahoo! Small Business gives you all the tools to get online.



--
Robert Lahmer
Quality First Software GmbH                http://www.qfs.de
Tulpenstr. 41                           Tel: +49 8171 919874
DE-82538 Geretsried                     Fax: +49 8171 919876
GF: Gregor Schmid, Karlheinz Kellerer     HRB München 140833




Videos Downloads Dokumentation Kaufen Gratis Testen