Forum Discussion

william_roe's avatar
william_roe
Super Contributor
11 years ago

Selecting Item(s) in Dynamic, Multi-select lists in Data-Driven Test

How do you create a data-driven test which checks item(s) in a list using a value and not a mapped object? I created a data-driven test with multiple if statements which clicked on the mapped object o...
  • TanyaYatskovska's avatar
    11 years ago
    Hi Keith,

     


    You can use the FindChildByXPath method. Here is the sample that obtains the check-box element based on the value specified in the Description column:


    var grid=//...obtain the grid object:

    var obj = grid.FindChildByXPath("//td[text()='Administrator Access']/parent::node()//input", false);


     


    To learn more about XPath expressions, I suggest that you refer to this tutorial.