Use a variable in element find logic

2 posts, 0 answers
  1. Bryan
    Bryan avatar
    19 posts
    Member since:
    Aug 2012

    Posted 01 Feb 2016 Link to this post

    I need to use the value from a variable to find an element to click.

    The variable value is being extracted from a database using C# (data binding won't work because I am already bound to the data, but this value did not exist at the time of binding).

    The variable name is varDocID

    I am trying to use it to compare to the OnClick event of the image I need to click in a grid with many instances of the same image.

    ~$(varDocID) does not work as it does not use the value and only tries to comapre to the variable name instead of the variable value.

    Please advise.

  2. Boyan Boev
    Boyan Boev avatar
    1072 posts

    Posted 04 Feb 2016 Link to this post

    Hi Bryan,

    Here is a detailed article about data driven find expression.

    If you create the variable in code you should then type its name manually in the drop down.

    Let me know if that works for you.

    Boyan Boev
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top