This is a migrated thread and some comments may be shown as answers.

xpath syntax from within the elements repository

2 Answers 90 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 09 May 2013, 05:06 PM
I am trying to locate the parent of the current node using XPath (or any other method).  In my example, the leaf node is easily identifiable, but I am trying to locate the parent "td" node - nothing seems to work:
    ..
    //..
    ../td

The main group of the locator locates the leaf node, then I try to add a child group filter and specify the XPath thinking that the current context will be the node I located above (see attached image).


Any suggestions?

2 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 09 May 2013, 05:56 PM
Well, I was able to get something done with a coded step:

Pages.PegaDesignerStudio.CloseSpan.Parent<HtmlTableCell>().MouseClick();

I don't love it, as it makes the test hard to read, but I am unblocked.  Seems like this might be a common scenario, will enter an enhancement request.
0
Rodney
Telerik team
answered on 14 May 2013, 08:44 PM
Hi David,

Thank you for bringing this to our attention. I've filed feature request for this behavior. You can follow its progress and vote for its inclusion in future versions of Test Studio at the follow link: Public URL

Greetings,
Rodney
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Rodney
Telerik team
Share this question
or