Ahh yes - saw FindSingle in there, but it turns out to be much simpler than I thought. The column names are absolute so that's fine, and I just needed to the contains in the value. Really, what I needed was to walk away from it for a little while
It all works now though, in case it's useful to others, this is what it looked like in the end:
Setting:
Code: Select all
default:
// Open combobox using property
comboBox.DropDownVisible = true;
// Select list item with from DropDown list
ListItem listItem = comboBox.FindSingle<ListItem>("list/listitem[@accessiblename~'^"+ testField.Value + ".*']");
listItem.Select();
listItem.Click();
Delay.Seconds(delayAfterFieldSetInSeconds);
break;
Getting a row from the grid based on a partial match of the grid VALUE:
Code: Select all
public static Row GetDataRow(Dictionary<string, string> searchVaules, Table dataTable)
{
Row foundRow = null;
foreach(Row iterationRow in dataTable.Rows)
{
bool valuesMatch = true;
foreach(KeyValuePair<string, string> kvp in searchVaules)
{
Cell cellToVerify = iterationRow.FindChild<Cell>(kvp.Key);
if (!cellToVerify.Text.Contains(kvp.Value))
{
valuesMatch = false;
break;
}
}
if (valuesMatch)
{
foundRow = iterationRow;
break;
}
}
return foundRow;
}
Thanks again for the insights
