Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » Relative path_type
Relative path_type [message #1692096] Mon, 13 April 2015 12:22 Go to next message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
Registered: October 2011
Member
Hi,

I just can't get the relative path_type to work.

I have selected a node in a file tree and want to check that a node one step below in the tree matches a specific text path. I'm using "ub_tre_checkExistenceOfNode_byTextPath".

How should the parameter "TEXTPATH" be written?

Regards Richard
Re: Relative path_type [message #1692163 is a reply to message #1692096] Tue, 14 April 2015 05:41 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hello Richard,

If the node "one step below" is a sibling node of the node you've selected, then you have two options:

- you can use a relative path with a pre-ascend of '1' --> this will move to the parent of the currently selected node and then select the relative path you enter. Depending on your tree structure (i.e. if the sibling nodes are not unique), this may not help.
- you can use the action "move" with the parameter "next" to move one step lower in the tree and then perform check text of selected node.

The docs for both actions are here:
http://help.eclipse.org/luna/topic/org.eclipse.jubula.client.ua.help/html/reference/node21.html?cp=35_3_1_9

Best regards,
Alex
Re: Relative path_type [message #1692183 is a reply to message #1692163] Tue, 14 April 2015 08:00 Go to previous messageGo to next message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
Registered: October 2011
Member
Hi,

Yes the tree consists of siblings.

This is how my tree looks like:

Test
|
--- A
--- B
--- C

I have selected the "Test" node and just want to check if "A", "B" and "C" are available. The order of the siblings can differ from time to time and there can also be other siblings which I don't want to check. How should this be done? I can't get the relative path to work. Could you please write an example of my case?

I don't think that "move" will fix my problem either due to that it will move to the first sibling node (in my case "A"). I then can check the text of the selected node but the order could be another then "A", "B" and "C" and siblings not to be checked could also exist so this won't work.

Regards Richard
Re: Relative path_type [message #1692286 is a reply to message #1692096] Tue, 14 April 2015 18:45 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Thanks for the explanation. In your example, the nodes A,B and C are child nodes of "Test".
If you select "Test" and want to check that it has child nodes that are "A", "B" and "C", then you should be able to specify that you want to do the check relatively, using the "path type" parameter.
Then you should just be able to enter "A" as the path.

The test should look something like this:

- Select parent node (unbound module for select node by text path): PATH_TYPE absolute; PRE-ASCEND 0; TEXTPATH Test; OPERATOR equals; NUMBER_OF_CLICKS 1; MOUSE_BUTTON 1; EXTEND_SELECTION no;
- Check existence of child node (unbound module for check existence of node by text path): PATH_TYPE relative; PRE-ASCEND 0; TEXTPATH A; OPERATOR equals; EXISTS true;


It'll be important to have actually clicked the first node you select (i.e. not using 0 clicks to just hover the mouse over the parent node).

I've attached a mini project that shows a test. It's using the 8.0 version and Swing, but the principle applies to all versions and toolkits.

Hope this helps,
Alex
Re: Relative path_type [message #1692335 is a reply to message #1692286] Wed, 15 April 2015 07:22 Go to previous message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
Registered: October 2011
Member
Thanks! The problem is solved!

Regards Richard
Previous Topic:Support for Eclipse Mars AUTs
Next Topic:How to check value of "Spinner" UI element?
Goto Forum:
  


Current Time: Tue Apr 23 17:24:49 GMT 2024

Powered by FUDForum. Page generated in 0.02723 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top