次のコードを使用して、ランダムに生成された行のIDを取得しています。
string[] rowIds = new string[numofRowsPassengerTable];
for (int counter=1; counter < numofRowsPassengerTable; counter++)
{
rowIds[counter] = browser.GetAttribute("xpath=//table[@id='tblPassengers']/tbody/tr[counter]@id");
}
しかし、上記は何も返していません。1または2の代わりに使用するcounterと、IDが返されます。そのカウンターを使用して行IDを取得するにはどうすればよいですか?