次のコードを使用して、ランダムに生成された行の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を取得するにはどうすればよいですか?