Logo QF-Test

Finding valuable answers
in the Mailing List Archive.

 

Free Trial  Download  Buy

Thomas Max, QF-Test training and support

Use the full-text search on our web site to find helpful tips on the mailing list.

Thomas Max, 
Sr. Software Engineer & Trainer, QFS

2017 up to now  | 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 2016


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

Re: [QF-Test] How to get all items for a combobox in only one variable


  • Subject: Re: [QF-Test] How to get all items for a combobox in only one variable
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: Thu, 09 Jun 2016 20:08:53 +0200

Hello Lydie,

if you just want to check all the values of a combo box you can
simply record the respective check. There's one that checks all the
items in one go.

If you really need to get them by script for further processing,
here's an example that should work for most cases.


from de.qfs.apps.qftest.extensions.items import ItemRegistry
com = rc.getComponent("<QF-Test ID of combobox>")
items = []
for i in  range(com.getItemCount()):
    items.append(ItemRegistry.instance().getItemValue(com, i))
# now you have the items to work with, e.g.
# print items

# to get them into a QF-Test variable:
rc.setLocal("comboItems", items)
# etc...


Best regards,
    Greg

NIVEAUX Lydie <Lydie.NIVEAUX@?.com> writes:

> Hello
>
> I am just beginner with QFtest.
>
> I want to get all values present in a combobox in one variable.
>
> I use a  procedure call “combo.fetchText” with the name of the combo
>
> This procedure return only the current value
>
> Can you help me please ?
>
> Lydie NIVEAUX
>
> This e-mail and any accompanying attachments are confidential. If you are not the intended recipient, you must not
> review, disclose, copy, distribute or use this e-mail; please delete it from your system and notify the sender
> immediately.

--
Gregor Schmid

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

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



Videos Downloads Documentation Buy Free Trial