2018 up to now | 2017 | 2016 | 2015 | 2014 | 2013 | 2012 | 2011 | 2010 | 2009 | 2008 | 2007

(older archive entries before 2007 are not shown here, but included in the onsite-search)

Mailing List - Entries of 2007


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

RE: [QF-Test] Help regarding Unknown property dialog


  • Subject: RE: [QF-Test] Help regarding Unknown property dialog
  • From: "Alfred Mathavan" <amathava@?.com>
  • Date: Wed, 4 Apr 2007 03:31:55 -0600

Martine,

 

Thanks for pointing out that silly mistake.

 

>>1.)

>> Line > rc.setLocal('type',"Switch."+str(rc.lookup('switchname')))

>>There you should use "Switches" instead of Switch :-)

 

I am sorry, I had taken this code from the previous version :-)

 

The Corrected code is

 

rc.setLocal('type',"Switches."+str(rc.lookup('switchname')))

 

2.)

The syntax ${var} won't make use of variable-expansion in a server script,

so you have to use the rc.lookup syntax here.

So try this one:

      print rc.lookup("SwitchGroup", str(type))

 

When I try this I got this dialog.

 

 

 

Any example on variable expansion from a server script and within a $(GroupName:PropertyName) syntax will help me.

 

Greetings,

Alfred

 

-----Original Message-----
From: Martin Moser [mailto:martin.moser@?.de]
Sent: Wednesday, April 04, 2007 1:20 PM
To: qftest-list@?.de
Cc: Alfred Mathavan
Subject: Re: [QF-Test] Help regarding Unknown property dialog

 

Hello Alfred,

 

there are two mistakes in your script:

 

1.)

Line > rc.setLocal('type',"Switch."+str(rc.lookup('switchname')))

There you should use "Switches" instead of Switch :-)

 

2.)

The syntax ${var} won't make use of variable-expansion in a server script,

so you have to use the rc.lookup syntax here.

So try this one:

      print rc.lookup("SwitchGroup", str(type))

 

 

 

Regards,

Martin

 

--On Mittwoch, April 04, 2007 00:18:50 -0600 Alfred Mathavan

<amathava@?.com> wrote:

 

> Hi ,

> 

> 

> 

> Senario:-

> 

> 

> 

> When I try to fetch a property by substituting dynamic value to the

> key(PropertyName) to the syntax $(GroupName:PropertyName) I get an

> Unknown property Error Dialog.

> 

> 

> 

> Ref:-

> 

> Property File Content

> 

> Switches.300 = ['172.31.11.181',]

> 

> Switches.400 = ['172.31.11.182','172.31.11.182',]

> 

> Switches.valueChoices=['300','400',]

> 

> 

> 

> Server Script that gets executed in a for loop with respect to the

> number of valueChoices

> 

> 

> 

>             name = ${SwitchGroup:Switches.valueChoices}[$(i)]

> 

> rc.setLocal('switchname',name)

> 

> 

> 

> rc.setLocal('type',"Switch."+str(rc.lookup('switchname')))

> 

> 

> 

> print rc.lookup('type')

> --------------------------------------------------------> Prints

> Switches.300

> 

> print ${SwitchGroup:Switches.300}

> --------------------------------------------------------> Prints

> ['172.31.11.181']

> 

> 

> 

> print ${SwitchGroup:rc.lookup('type')}

> ------------------------------------------------------->

> 

> 

> 

> 

> 

> Could you let me know where I am going wrong?

> 

> 

> 

> Greetings,

> 

> Alfred

> 

 

 

 

--

Martin Moser                           martin.moser@?.de

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 14083