Mailingliste - Einträge 2006

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

Re: [qftestJUI] using toServer and fromSUT

  • Subject: Re: [qftestJUI] using toServer and fromSUT
  • From: Martin Moser <martin.moser@?.de>
  • Date: Thu, 26 Oct 2006 12:53:09 +0200

Hello Eyere,

you can only pass objects, which are primitive types of Jython, i.e. strings, numbers, dictionaries, etc. from a SUT-script to a server-script.
So you won't be able to work with the table-object itself on  server-side.

In your case the fromSUT() call isn't necessary because toServer() in the SUT-script sets the variable on the server-side already.

In general passing variables between to scripts should work like that:

in Server-script 1:
global testVariable

in SUT-script:

global testVariable

in Server-script 2:
#for verification
print "Content of variable ->  ", testVariable


--On Donnerstag, Oktober 26, 2006 10:04:52 +0200 Eyere Takem <Eyere.Takem@?.de> wrote:

Hi Gregor,

I do not know where I am going wrong. I want to pass a variable from an
SUT script to a server script.

  * I set a global variable in a Server script

rc.setGlobal("table", "eyere")

  * In the SUT script

# get the table component

table = rc.getComponent("scrollRight.table")

rc.toServer (table)

  * In a Server script

        table2= rc.fromSUT("modeus","table")

When I run the above, I get the following error

KeyError: table

Where I am going wrong?

Best regards.


Martin Moser                                  Martin.Moser@?.de
Quality First Software GmbH           
Tulpenstr. 41                                Tel: +49 8171 919874
DE-82538 Geretsried                          Fax: +49 8171 919876