List Icon
Archive de la liste de diffusion

La liste de diffusion est fermée depuis juillet 2022, mais sert toujours d'archive d'informations sur QF-Test.
Cependant, si vous souhaitez rester informé des nouveautés concernant QF-Test, vous pouvez simplement vous abonner à la newsletter :
abonner à la newsletter 

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

Re: [QF-Test] Check the state of the checkbox of a tree node

  • Subject: Re: [QF-Test] Check the state of the checkbox of a tree node
  • From: Joaquin Rodriguez Guerra <Joaquin.RodriguezGuerra@?.int>
  • Date: Mon, 8 Jul 2013 11:13:39 +0200


I have been taking a look at the possibilities you offered me for checking if a node is checked or not in a jtree (each node has a checkbox) and:

- First, the "node image" check seems easier to use, but I don’t see how it can be applied. If I apply the check to the tree, how does it exactly know to what node it has to apply the check? It is not easy to define the "check region inside image" because we don’t know how much expanded the tree is in a certain moment.

- About the SUT script, I was trying to do the following:

	tree = rc.getComponent("TreeId")
	model = tree.getModel()
	// now i am not sure how to access the node I want to check,
	// from the gui I could invoke:
	// qfs.swing.tree.selectNode(id:"treeId",node:"node label", sepatator:"@")
	// Shall I iterate over all the leafs to find my node?

And then, once I have the node, how could I check if the checkbox is selected or not? Will the checkbox be accessible from the Component object?

Thanks in adavance!


-----Original Message-----
From: qftest-list-bounces@?.de [mailto:qftest-list-bounces@?.de] On Behalf Of Joaquin Rodriguez Guerra
Sent: Tuesday, June 25, 2013 3:47 PM
To: 'Martin Moser'; 'qftest-list@?.de'
Subject: Re: [QF-Test] Check the state of the checkbox of a tree node

Thanks for the tip Martin!

-----Original Message-----
From: Martin Moser [mailto:martin.moser@?.de]
Sent: Tuesday, June 25, 2013 9:45 AM
To: 'qftest-list@?.de'
Cc: Joaquin Rodriguez Guerra
Subject: Re: [QF-Test] Check the state of the checkbox of a tree node

Hi Joaquin,

checkboxes in tree node are a special thing.

In this case you mostly have to access the java object in an SUT script.

Alternatively you can use ''Node image' check and check for a selected image.

Best Regards,

--On Montag, Juni 24, 2013 12:01:43 +0200 Joaquin Rodriguez Guerra <Joaquin.RodriguezGuerra@?.int> wrote:

> Hey everyone,
> I have a swing tree where very node is composed by a checkbox and a label.
> I am selecting/deselecting the checkboxes in the swing tree by using
> the swing.tree.selectNode procedure.  Now I would be interested in
> knowing if the checkbox of a node is selected or not, before selecting
> the node again. Is there an easy way to do this? I tried to record the
> action to get the Checkbox id, but it seems like it only sees a click
> on a tree node.
> Thanks in advance!
> Cheers,
> Joaquín
> _______________________________________________
> qftest-list mailing list
> qftest-list@?.de

Martin Moser                           martin.moser@?.de
Quality First Software GmbH  
Tulpenstr. 41                          Tel: +49 8171 38648-14
DE-82538 Geretsried                    Fax: +49 8171 38648-16
GF: Gregor Schmid, Karlheinz Kellerer  HRB München 14083

qftest-list mailing list