Use Bounded value in XPath expression

2 posts, 0 answers
  1. Nick Cephas
    Nick Cephas avatar
    1 posts
    Member since:
    Mar 2019

    Posted 01 Aug Link to this post


    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.
  2. Elena
    Admin
    Elena avatar
    1155 posts

    Posted 02 Aug Link to this post

    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!
Back to Top