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

Use Bounded value in XPath expression

1 Answer 18 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nick Cephas
Top achievements
Rank 1
Nick Cephas asked on 01 Aug 2019, 09:58 AM

I use Telerik Test Studio for end-to-end tests automations. In elements finding criteria there are many options including using XPath expression. So, my problem now is about how to include a binding value in that XPath expression.
I have tried to use $(BindingVariableName) but it's not working. This idea is coming from that that link but using their syntax seems to be taking in account the whole field as for the example in the link.
Using $(Binding) into XPath expressions seems to consider $(Binding) as a text.
Here, a sample of what I'm expecting. //td[@name=$(bindingVariableName)] but Test Studio could not find element.

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 02 Aug 2019, 12:20 PM
Hello Nick,

The data binding for elements' find expressions in Test Studio works as a whole string. That said means that you need to enter in the data source the whole xpath -  //td[@name=tdname] and use the respective column to attach to the filter. 

I hope this will be helpful for you to continue adjusting the project you work on. However, in case you have any further questions, please do not hesitate to get back to us, 

Thanks for your cooperation in advance. 

Regards,
Elena
Progress Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Nick Cephas
Top achievements
Rank 1
Answers by
Elena
Telerik team
Share this question
or